container-superposition 0.1.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 (327) hide show
  1. package/README.md +843 -0
  2. package/dist/scripts/init.d.ts +3 -0
  3. package/dist/scripts/init.d.ts.map +1 -0
  4. package/dist/scripts/init.js +1190 -0
  5. package/dist/scripts/init.js.map +1 -0
  6. package/dist/scripts/migrate-to-manifests.d.ts +12 -0
  7. package/dist/scripts/migrate-to-manifests.d.ts.map +1 -0
  8. package/dist/scripts/migrate-to-manifests.js +230 -0
  9. package/dist/scripts/migrate-to-manifests.js.map +1 -0
  10. package/dist/tool/questionnaire/composer.d.ts +6 -0
  11. package/dist/tool/questionnaire/composer.d.ts.map +1 -0
  12. package/dist/tool/questionnaire/composer.js +1232 -0
  13. package/dist/tool/questionnaire/composer.js.map +1 -0
  14. package/dist/tool/readme/markdown-parser.d.ts +30 -0
  15. package/dist/tool/readme/markdown-parser.d.ts.map +1 -0
  16. package/dist/tool/readme/markdown-parser.js +139 -0
  17. package/dist/tool/readme/markdown-parser.js.map +1 -0
  18. package/dist/tool/readme/readme-generator.d.ts +9 -0
  19. package/dist/tool/readme/readme-generator.d.ts.map +1 -0
  20. package/dist/tool/readme/readme-generator.js +422 -0
  21. package/dist/tool/readme/readme-generator.js.map +1 -0
  22. package/dist/tool/schema/custom-loader.d.ts +17 -0
  23. package/dist/tool/schema/custom-loader.d.ts.map +1 -0
  24. package/dist/tool/schema/custom-loader.js +149 -0
  25. package/dist/tool/schema/custom-loader.js.map +1 -0
  26. package/dist/tool/schema/overlay-loader.d.ts +47 -0
  27. package/dist/tool/schema/overlay-loader.d.ts.map +1 -0
  28. package/dist/tool/schema/overlay-loader.js +252 -0
  29. package/dist/tool/schema/overlay-loader.js.map +1 -0
  30. package/dist/tool/schema/types.d.ts +212 -0
  31. package/dist/tool/schema/types.d.ts.map +1 -0
  32. package/dist/tool/schema/types.js +5 -0
  33. package/dist/tool/schema/types.js.map +1 -0
  34. package/docs/README.md +308 -0
  35. package/docs/architecture.md +233 -0
  36. package/docs/creating-overlays.md +549 -0
  37. package/docs/custom-patches.md +540 -0
  38. package/docs/dependencies.md +279 -0
  39. package/docs/examples/custom-patches-example.md +85 -0
  40. package/docs/examples.md +576 -0
  41. package/docs/messaging-comparison.md +265 -0
  42. package/docs/messaging-quick-start.md +385 -0
  43. package/docs/observability-workflow.md +537 -0
  44. package/docs/overlay-manifest-refactoring.md +214 -0
  45. package/docs/overlay-metadata-archive.md +54 -0
  46. package/docs/overlays.md +523 -0
  47. package/docs/presets-architecture.md +498 -0
  48. package/docs/presets.md +366 -0
  49. package/docs/publishing.md +476 -0
  50. package/docs/quick-reference.md +326 -0
  51. package/docs/ux.md +170 -0
  52. package/features/README.md +85 -0
  53. package/features/cross-distro-packages/README.md +146 -0
  54. package/features/cross-distro-packages/devcontainer-feature.json +20 -0
  55. package/features/cross-distro-packages/install.sh +58 -0
  56. package/features/local-secrets-manager/devcontainer-feature.json +18 -0
  57. package/features/local-secrets-manager/install.sh +127 -0
  58. package/features/project-scaffolder/devcontainer-feature.json +24 -0
  59. package/features/project-scaffolder/install.sh +100 -0
  60. package/features/team-conventions/devcontainer-feature.json +24 -0
  61. package/features/team-conventions/install.sh +93 -0
  62. package/overlays/.registry/README.md +14 -0
  63. package/overlays/.registry/base-images.yml +26 -0
  64. package/overlays/.registry/base-templates.yml +7 -0
  65. package/overlays/README.md +155 -0
  66. package/overlays/alertmanager/.env.example +5 -0
  67. package/overlays/alertmanager/README.md +465 -0
  68. package/overlays/alertmanager/alert-rules.yml +56 -0
  69. package/overlays/alertmanager/alertmanager.yml +42 -0
  70. package/overlays/alertmanager/devcontainer.patch.json +12 -0
  71. package/overlays/alertmanager/docker-compose.yml +20 -0
  72. package/overlays/alertmanager/overlay.yml +17 -0
  73. package/overlays/alertmanager/setup.sh +53 -0
  74. package/overlays/alertmanager/verify.sh +31 -0
  75. package/overlays/aws-cli/README.md +473 -0
  76. package/overlays/aws-cli/devcontainer.patch.json +13 -0
  77. package/overlays/aws-cli/overlay.yml +13 -0
  78. package/overlays/azure-cli/README.md +551 -0
  79. package/overlays/azure-cli/devcontainer.patch.json +8 -0
  80. package/overlays/azure-cli/overlay.yml +13 -0
  81. package/overlays/bun/README.md +312 -0
  82. package/overlays/bun/devcontainer.patch.json +41 -0
  83. package/overlays/bun/overlay.yml +16 -0
  84. package/overlays/bun/setup.sh +79 -0
  85. package/overlays/bun/verify.sh +30 -0
  86. package/overlays/codex/README.md +128 -0
  87. package/overlays/codex/devcontainer.patch.json +3 -0
  88. package/overlays/codex/overlay.yml +14 -0
  89. package/overlays/codex/setup.sh +24 -0
  90. package/overlays/codex/verify.sh +30 -0
  91. package/overlays/commitlint/README.md +333 -0
  92. package/overlays/commitlint/devcontainer.patch.json +8 -0
  93. package/overlays/commitlint/overlay.yml +16 -0
  94. package/overlays/commitlint/setup.sh +234 -0
  95. package/overlays/direnv/README.md +504 -0
  96. package/overlays/direnv/devcontainer.patch.json +6 -0
  97. package/overlays/direnv/overlay.yml +13 -0
  98. package/overlays/direnv/setup.sh +139 -0
  99. package/overlays/docker-in-docker/README.md +534 -0
  100. package/overlays/docker-in-docker/devcontainer.patch.json +10 -0
  101. package/overlays/docker-in-docker/overlay.yml +13 -0
  102. package/overlays/docker-sock/README.md +256 -0
  103. package/overlays/docker-sock/devcontainer.patch.json +9 -0
  104. package/overlays/docker-sock/docker-compose.yml +8 -0
  105. package/overlays/docker-sock/overlay.yml +13 -0
  106. package/overlays/dotnet/README.md +147 -0
  107. package/overlays/dotnet/devcontainer.patch.json +51 -0
  108. package/overlays/dotnet/global-tools.txt +24 -0
  109. package/overlays/dotnet/overlay.yml +13 -0
  110. package/overlays/dotnet/setup.sh +51 -0
  111. package/overlays/dotnet/verify.sh +26 -0
  112. package/overlays/gcloud/README.md +269 -0
  113. package/overlays/gcloud/devcontainer.patch.json +14 -0
  114. package/overlays/gcloud/overlay.yml +14 -0
  115. package/overlays/gcloud/verify.sh +52 -0
  116. package/overlays/git-helpers/README.md +168 -0
  117. package/overlays/git-helpers/devcontainer.patch.json +33 -0
  118. package/overlays/git-helpers/overlay.yml +15 -0
  119. package/overlays/git-helpers/setup.sh +91 -0
  120. package/overlays/go/README.md +293 -0
  121. package/overlays/go/devcontainer.patch.json +43 -0
  122. package/overlays/go/overlay.yml +15 -0
  123. package/overlays/go/setup.sh +33 -0
  124. package/overlays/go/verify.sh +40 -0
  125. package/overlays/grafana/.env.example +9 -0
  126. package/overlays/grafana/README.md +462 -0
  127. package/overlays/grafana/dashboard-provider.yml +11 -0
  128. package/overlays/grafana/dashboards/observability-overview.json +263 -0
  129. package/overlays/grafana/devcontainer.patch.json +12 -0
  130. package/overlays/grafana/docker-compose.yml +27 -0
  131. package/overlays/grafana/grafana-datasources.yml +57 -0
  132. package/overlays/grafana/overlay.yml +21 -0
  133. package/overlays/grafana/verify.sh +34 -0
  134. package/overlays/jaeger/.env.example +7 -0
  135. package/overlays/jaeger/README.md +867 -0
  136. package/overlays/jaeger/devcontainer.patch.json +12 -0
  137. package/overlays/jaeger/docker-compose.yml +17 -0
  138. package/overlays/jaeger/overlay.yml +19 -0
  139. package/overlays/java/README.md +267 -0
  140. package/overlays/java/devcontainer.patch.json +44 -0
  141. package/overlays/java/overlay.yml +16 -0
  142. package/overlays/java/setup.sh +41 -0
  143. package/overlays/java/verify.sh +42 -0
  144. package/overlays/just/README.md +443 -0
  145. package/overlays/just/devcontainer.patch.json +3 -0
  146. package/overlays/just/overlay.yml +13 -0
  147. package/overlays/just/setup.sh +182 -0
  148. package/overlays/kubectl-helm/README.md +660 -0
  149. package/overlays/kubectl-helm/devcontainer.patch.json +10 -0
  150. package/overlays/kubectl-helm/overlay.yml +13 -0
  151. package/overlays/loki/.env.example +5 -0
  152. package/overlays/loki/README.md +1156 -0
  153. package/overlays/loki/devcontainer.patch.json +12 -0
  154. package/overlays/loki/docker-compose.yml +18 -0
  155. package/overlays/loki/loki-config.yaml +45 -0
  156. package/overlays/loki/overlay.yml +17 -0
  157. package/overlays/minio/.env.example +9 -0
  158. package/overlays/minio/README.md +639 -0
  159. package/overlays/minio/devcontainer.patch.json +30 -0
  160. package/overlays/minio/docker-compose.yml +28 -0
  161. package/overlays/minio/overlay.yml +18 -0
  162. package/overlays/minio/setup.sh +61 -0
  163. package/overlays/minio/verify.sh +64 -0
  164. package/overlays/mkdocs/README.md +309 -0
  165. package/overlays/mkdocs/devcontainer.patch.json +24 -0
  166. package/overlays/mkdocs/overlay.yml +15 -0
  167. package/overlays/modern-cli-tools/README.md +556 -0
  168. package/overlays/modern-cli-tools/devcontainer.patch.json +3 -0
  169. package/overlays/modern-cli-tools/overlay.yml +13 -0
  170. package/overlays/modern-cli-tools/setup.sh +153 -0
  171. package/overlays/mongodb/.env.example +9 -0
  172. package/overlays/mongodb/README.md +481 -0
  173. package/overlays/mongodb/devcontainer.patch.json +32 -0
  174. package/overlays/mongodb/docker-compose.yml +44 -0
  175. package/overlays/mongodb/overlay.yml +17 -0
  176. package/overlays/mongodb/verify.sh +48 -0
  177. package/overlays/mysql/.env.example +11 -0
  178. package/overlays/mysql/README.md +542 -0
  179. package/overlays/mysql/devcontainer.patch.json +34 -0
  180. package/overlays/mysql/docker-compose.yml +55 -0
  181. package/overlays/mysql/overlay.yml +16 -0
  182. package/overlays/mysql/verify.sh +48 -0
  183. package/overlays/nats/.env.example +5 -0
  184. package/overlays/nats/README.md +762 -0
  185. package/overlays/nats/devcontainer.patch.json +24 -0
  186. package/overlays/nats/docker-compose.yml +31 -0
  187. package/overlays/nats/overlay.yml +18 -0
  188. package/overlays/nats/verify.sh +50 -0
  189. package/overlays/ngrok/README.md +503 -0
  190. package/overlays/ngrok/devcontainer.patch.json +3 -0
  191. package/overlays/ngrok/overlay.yml +14 -0
  192. package/overlays/ngrok/setup.sh +125 -0
  193. package/overlays/nodejs/README.md +192 -0
  194. package/overlays/nodejs/devcontainer.patch.json +49 -0
  195. package/overlays/nodejs/global-packages.txt +16 -0
  196. package/overlays/nodejs/overlay.yml +14 -0
  197. package/overlays/nodejs/setup.sh +46 -0
  198. package/overlays/nodejs/verify.sh +32 -0
  199. package/overlays/otel-collector/.env.example +9 -0
  200. package/overlays/otel-collector/README.md +1257 -0
  201. package/overlays/otel-collector/devcontainer.patch.json +28 -0
  202. package/overlays/otel-collector/docker-compose.yml +22 -0
  203. package/overlays/otel-collector/otel-collector-config.yaml +68 -0
  204. package/overlays/otel-collector/overlay.yml +21 -0
  205. package/overlays/otel-collector/setup.sh +49 -0
  206. package/overlays/otel-demo-nodejs/.env.example +2 -0
  207. package/overlays/otel-demo-nodejs/Dockerfile-otel-demo-nodejs +17 -0
  208. package/overlays/otel-demo-nodejs/README.md +409 -0
  209. package/overlays/otel-demo-nodejs/devcontainer.patch.json +12 -0
  210. package/overlays/otel-demo-nodejs/docker-compose.yml +19 -0
  211. package/overlays/otel-demo-nodejs/overlay.yml +23 -0
  212. package/overlays/otel-demo-nodejs/package-otel-demo-nodejs.json +20 -0
  213. package/overlays/otel-demo-nodejs/server-otel-demo-nodejs.js +259 -0
  214. package/overlays/otel-demo-nodejs/tracing-otel-demo-nodejs.js +57 -0
  215. package/overlays/otel-demo-nodejs/verify.sh +31 -0
  216. package/overlays/otel-demo-python/.env.example +2 -0
  217. package/overlays/otel-demo-python/Dockerfile-otel-demo-python +16 -0
  218. package/overlays/otel-demo-python/README.md +82 -0
  219. package/overlays/otel-demo-python/app-otel-demo-python.py +208 -0
  220. package/overlays/otel-demo-python/devcontainer.patch.json +12 -0
  221. package/overlays/otel-demo-python/docker-compose.yml +19 -0
  222. package/overlays/otel-demo-python/overlay.yml +23 -0
  223. package/overlays/otel-demo-python/requirements-otel-demo-python.txt +4 -0
  224. package/overlays/otel-demo-python/verify.sh +31 -0
  225. package/overlays/playwright/README.md +629 -0
  226. package/overlays/playwright/devcontainer.patch.json +9 -0
  227. package/overlays/playwright/overlay.yml +13 -0
  228. package/overlays/postgres/.env.example +6 -0
  229. package/overlays/postgres/README.md +602 -0
  230. package/overlays/postgres/devcontainer.patch.json +21 -0
  231. package/overlays/postgres/docker-compose.yml +22 -0
  232. package/overlays/postgres/overlay.yml +15 -0
  233. package/overlays/postgres/verify.sh +45 -0
  234. package/overlays/powershell/README.md +314 -0
  235. package/overlays/powershell/devcontainer.patch.json +22 -0
  236. package/overlays/powershell/overlay.yml +13 -0
  237. package/overlays/powershell/setup.sh +29 -0
  238. package/overlays/powershell/verify.sh +38 -0
  239. package/overlays/pre-commit/README.md +263 -0
  240. package/overlays/pre-commit/devcontainer.patch.json +9 -0
  241. package/overlays/pre-commit/overlay.yml +16 -0
  242. package/overlays/pre-commit/setup.sh +129 -0
  243. package/overlays/presets/docs-site.yml +118 -0
  244. package/overlays/presets/fullstack.yml +181 -0
  245. package/overlays/presets/microservice.yml +118 -0
  246. package/overlays/presets/web-api.yml +109 -0
  247. package/overlays/prometheus/.env.example +5 -0
  248. package/overlays/prometheus/README.md +1246 -0
  249. package/overlays/prometheus/devcontainer.patch.json +12 -0
  250. package/overlays/prometheus/docker-compose.yml +22 -0
  251. package/overlays/prometheus/overlay.yml +17 -0
  252. package/overlays/prometheus/prometheus.yml +12 -0
  253. package/overlays/prometheus/verify.sh +34 -0
  254. package/overlays/promtail/.env.example +2 -0
  255. package/overlays/promtail/README.md +357 -0
  256. package/overlays/promtail/devcontainer.patch.json +5 -0
  257. package/overlays/promtail/docker-compose.yml +16 -0
  258. package/overlays/promtail/overlay.yml +17 -0
  259. package/overlays/promtail/promtail-config.yaml +60 -0
  260. package/overlays/promtail/verify.sh +31 -0
  261. package/overlays/pulumi/README.md +472 -0
  262. package/overlays/pulumi/devcontainer.patch.json +13 -0
  263. package/overlays/pulumi/overlay.yml +14 -0
  264. package/overlays/pulumi/verify.sh +31 -0
  265. package/overlays/python/README.md +919 -0
  266. package/overlays/python/devcontainer.patch.json +41 -0
  267. package/overlays/python/overlay.yml +12 -0
  268. package/overlays/python/requirements-overlay.txt +13 -0
  269. package/overlays/python/setup.sh +47 -0
  270. package/overlays/python/verify.sh +32 -0
  271. package/overlays/rabbitmq/.env.example +7 -0
  272. package/overlays/rabbitmq/README.md +680 -0
  273. package/overlays/rabbitmq/devcontainer.patch.json +28 -0
  274. package/overlays/rabbitmq/docker-compose.yml +30 -0
  275. package/overlays/rabbitmq/overlay.yml +18 -0
  276. package/overlays/rabbitmq/verify.sh +41 -0
  277. package/overlays/redis/.env.example +4 -0
  278. package/overlays/redis/README.md +776 -0
  279. package/overlays/redis/devcontainer.patch.json +21 -0
  280. package/overlays/redis/docker-compose.yml +21 -0
  281. package/overlays/redis/overlay.yml +15 -0
  282. package/overlays/redis/verify.sh +41 -0
  283. package/overlays/redpanda/.env.example +10 -0
  284. package/overlays/redpanda/README.md +703 -0
  285. package/overlays/redpanda/devcontainer.patch.json +37 -0
  286. package/overlays/redpanda/docker-compose.yml +67 -0
  287. package/overlays/redpanda/overlay.yml +21 -0
  288. package/overlays/redpanda/verify.sh +48 -0
  289. package/overlays/rust/README.md +299 -0
  290. package/overlays/rust/devcontainer.patch.json +39 -0
  291. package/overlays/rust/overlay.yml +15 -0
  292. package/overlays/rust/setup.sh +36 -0
  293. package/overlays/rust/verify.sh +51 -0
  294. package/overlays/sqlite/README.md +584 -0
  295. package/overlays/sqlite/devcontainer.patch.json +14 -0
  296. package/overlays/sqlite/overlay.yml +15 -0
  297. package/overlays/sqlite/setup.sh +27 -0
  298. package/overlays/sqlite/verify.sh +43 -0
  299. package/overlays/sqlserver/.env.example +6 -0
  300. package/overlays/sqlserver/README.md +592 -0
  301. package/overlays/sqlserver/devcontainer.patch.json +22 -0
  302. package/overlays/sqlserver/docker-compose.yml +32 -0
  303. package/overlays/sqlserver/overlay.yml +17 -0
  304. package/overlays/sqlserver/verify.sh +30 -0
  305. package/overlays/tempo/.env.example +5 -0
  306. package/overlays/tempo/README.md +273 -0
  307. package/overlays/tempo/devcontainer.patch.json +12 -0
  308. package/overlays/tempo/docker-compose.yml +20 -0
  309. package/overlays/tempo/overlay.yml +20 -0
  310. package/overlays/tempo/tempo-config.yaml +32 -0
  311. package/overlays/tempo/verify.sh +31 -0
  312. package/overlays/terraform/README.md +389 -0
  313. package/overlays/terraform/devcontainer.patch.json +15 -0
  314. package/overlays/terraform/overlay.yml +14 -0
  315. package/overlays/terraform/verify.sh +63 -0
  316. package/package.json +74 -0
  317. package/templates/README.md +285 -0
  318. package/templates/compose/.devcontainer/devcontainer.json +46 -0
  319. package/templates/compose/.devcontainer/docker-compose.yml +12 -0
  320. package/templates/compose/README.md +20 -0
  321. package/templates/plain/.devcontainer/devcontainer.json +35 -0
  322. package/templates/plain/README.md +21 -0
  323. package/tool/README.md +281 -0
  324. package/tool/schema/base-images.schema.json +43 -0
  325. package/tool/schema/base-templates.schema.json +34 -0
  326. package/tool/schema/config.schema.json +71 -0
  327. package/tool/schema/overlay-manifest.schema.json +86 -0
@@ -0,0 +1,314 @@
1
+ # PowerShell Overlay
2
+
3
+ Adds PowerShell Core (cross-platform) for scripting, automation, and cloud management tasks.
4
+
5
+ ## Features
6
+
7
+ - **PowerShell Core** - Latest cross-platform PowerShell (pwsh)
8
+ - **PSScriptAnalyzer** - Linting and best practice analyzer
9
+ - **Pester** - Testing framework for PowerShell scripts
10
+ - **PowerShellGet** - Module management
11
+ - **VS Code Extension:** PowerShell (ms-vscode.powershell) - Complete PowerShell IDE
12
+ - **Cross-platform** - Works on Linux, macOS, and Windows containers
13
+
14
+ ## How It Works
15
+
16
+ This overlay installs PowerShell Core via the official devcontainers feature. PowerShell Core is the cross-platform version of PowerShell that runs on Linux, macOS, and Windows. The setup script installs essential modules for development and testing.
17
+
18
+ **Installation method:**
19
+
20
+ - PowerShell Core via devcontainer feature
21
+ - Modules via PowerShellGet
22
+ - Modules stored in user profile
23
+
24
+ ## Common Commands
25
+
26
+ ### Basic PowerShell
27
+
28
+ ```powershell
29
+ # Run PowerShell
30
+ pwsh
31
+
32
+ # Run script
33
+ pwsh ./script.ps1
34
+
35
+ # Run command
36
+ pwsh -Command "Get-Process"
37
+
38
+ # Interactive mode
39
+ pwsh -NoProfile
40
+ ```
41
+
42
+ ### Module Management
43
+
44
+ ```powershell
45
+ # List installed modules
46
+ Get-Module -ListAvailable
47
+
48
+ # Install module
49
+ Install-Module -Name Az -Scope CurrentUser
50
+
51
+ # Import module
52
+ Import-Module Az
53
+
54
+ # Update module
55
+ Update-Module Az
56
+
57
+ # Find modules
58
+ Find-Module -Name "*Azure*"
59
+
60
+ # Uninstall module
61
+ Uninstall-Module Az
62
+ ```
63
+
64
+ ### Script Development
65
+
66
+ ```powershell
67
+ # Create new script
68
+ New-Item -Path ./script.ps1 -ItemType File
69
+
70
+ # Run with parameters
71
+ pwsh ./script.ps1 -Parameter1 "value" -Parameter2 42
72
+
73
+ # Run with execution policy bypass
74
+ pwsh -ExecutionPolicy Bypass -File ./script.ps1
75
+
76
+ # Measure script execution time
77
+ Measure-Command { ./script.ps1 }
78
+ ```
79
+
80
+ ### Testing with Pester
81
+
82
+ ```powershell
83
+ # Run all tests
84
+ Invoke-Pester
85
+
86
+ # Run specific test file
87
+ Invoke-Pester ./Tests/MyScript.Tests.ps1
88
+
89
+ # Run with coverage
90
+ Invoke-Pester -CodeCoverage ./MyScript.ps1
91
+
92
+ # Example test file (MyScript.Tests.ps1)
93
+ Describe "MyScript Tests" {
94
+ It "Should return true" {
95
+ $result = ./MyScript.ps1
96
+ $result | Should -Be $true
97
+ }
98
+ }
99
+ ```
100
+
101
+ ### Linting with PSScriptAnalyzer
102
+
103
+ ```powershell
104
+ # Analyze script
105
+ Invoke-ScriptAnalyzer -Path ./script.ps1
106
+
107
+ # Analyze directory
108
+ Invoke-ScriptAnalyzer -Path ./ -Recurse
109
+
110
+ # Fix issues automatically
111
+ Invoke-ScriptAnalyzer -Path ./script.ps1 -Fix
112
+
113
+ # Check specific rules
114
+ Invoke-ScriptAnalyzer -Path ./script.ps1 -IncludeRule PSAvoidUsingCmdletAliases
115
+ ```
116
+
117
+ ## Use Cases
118
+
119
+ - **Cross-platform scripting** - Automation scripts that run on Linux/macOS/Windows
120
+ - **Azure automation** - Azure resource management (Az module)
121
+ - **AWS automation** - AWS resource management (AWS.Tools module)
122
+ - **DevOps pipelines** - CI/CD automation scripts
123
+ - **System administration** - Server configuration and management
124
+ - **Windows interop** - Linux/WSL integration with Windows systems
125
+
126
+ **Integrates well with:**
127
+
128
+ - `azure-cli` - Azure CLI + PowerShell Az module
129
+ - `aws-cli` - AWS CLI + PowerShell AWS.Tools
130
+ - `kubectl-helm` - Kubernetes management scripts
131
+ - `docker-sock` - Docker management with PowerShell
132
+
133
+ ## Configuration
134
+
135
+ ### Azure Module
136
+
137
+ Install Azure PowerShell module:
138
+
139
+ ```powershell
140
+ # Install Az module
141
+ Install-Module -Name Az -Scope CurrentUser -AllowClobber
142
+
143
+ # Connect to Azure
144
+ Connect-AzAccount
145
+
146
+ # List subscriptions
147
+ Get-AzSubscription
148
+
149
+ # Set subscription
150
+ Set-AzContext -SubscriptionId "subscription-id"
151
+ ```
152
+
153
+ ### AWS Module
154
+
155
+ Install AWS Tools for PowerShell:
156
+
157
+ ```powershell
158
+ # Install AWS.Tools
159
+ Install-Module -Name AWS.Tools.Installer -Scope CurrentUser
160
+
161
+ # Install specific AWS services
162
+ Install-AWSToolsModule AWS.Tools.EC2,AWS.Tools.S3
163
+
164
+ # Configure credentials
165
+ Set-AWSCredential -AccessKey "KEY" -SecretKey "SECRET" -StoreAs "default"
166
+
167
+ # Set region
168
+ Set-DefaultAWSRegion -Region us-east-1
169
+ ```
170
+
171
+ ### PowerShell Profile
172
+
173
+ Create profile for startup customization:
174
+
175
+ ```powershell
176
+ # Create profile
177
+ New-Item -Path $PROFILE -ItemType File -Force
178
+
179
+ # Edit profile
180
+ code $PROFILE
181
+
182
+ # Example profile content:
183
+ # Set default editor
184
+ $env:EDITOR = "code"
185
+
186
+ # Import common modules
187
+ Import-Module PSScriptAnalyzer
188
+
189
+ # Custom aliases
190
+ Set-Alias -Name k -Value kubectl
191
+ ```
192
+
193
+ ## Application Integration
194
+
195
+ ### Azure Resource Management
196
+
197
+ ```powershell
198
+ # List all resource groups
199
+ Get-AzResourceGroup
200
+
201
+ # Create resource group
202
+ New-AzResourceGroup -Name "MyResourceGroup" -Location "eastus"
203
+
204
+ # List VMs
205
+ Get-AzVM
206
+
207
+ # Start VM
208
+ Start-AzVM -ResourceGroupName "MyResourceGroup" -Name "MyVM"
209
+ ```
210
+
211
+ ### AWS S3 Operations
212
+
213
+ ```powershell
214
+ # List S3 buckets
215
+ Get-S3Bucket
216
+
217
+ # Upload file
218
+ Write-S3Object -BucketName "mybucket" -File "./file.txt" -Key "file.txt"
219
+
220
+ # Download file
221
+ Read-S3Object -BucketName "mybucket" -Key "file.txt" -File "./downloaded.txt"
222
+
223
+ # List objects
224
+ Get-S3Object -BucketName "mybucket"
225
+ ```
226
+
227
+ ### REST API Calls
228
+
229
+ ```powershell
230
+ # GET request
231
+ $response = Invoke-RestMethod -Uri "https://api.example.com/data" -Method Get
232
+
233
+ # POST request with JSON
234
+ $body = @{
235
+ name = "John"
236
+ age = 30
237
+ } | ConvertTo-Json
238
+
239
+ $response = Invoke-RestMethod -Uri "https://api.example.com/users" -Method Post -Body $body -ContentType "application/json"
240
+ ```
241
+
242
+ ## Troubleshooting
243
+
244
+ ### Issue: Execution policy error
245
+
246
+ **Symptoms:**
247
+
248
+ - "Execution policy does not allow running scripts"
249
+
250
+ **Solution:**
251
+
252
+ ```powershell
253
+ # Check current policy
254
+ Get-ExecutionPolicy
255
+
256
+ # Set policy for current user
257
+ Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
258
+
259
+ # Or bypass for single script
260
+ pwsh -ExecutionPolicy Bypass -File ./script.ps1
261
+ ```
262
+
263
+ ### Issue: Module not found
264
+
265
+ **Symptoms:**
266
+
267
+ - "Module not found" error
268
+
269
+ **Solution:**
270
+
271
+ ```powershell
272
+ # Check module path
273
+ $env:PSModulePath
274
+
275
+ # Install module
276
+ Install-Module -Name ModuleName -Scope CurrentUser
277
+
278
+ # Import module explicitly
279
+ Import-Module ModuleName
280
+ ```
281
+
282
+ ### Issue: PowerShell version mismatch
283
+
284
+ **Solution:**
285
+
286
+ ```powershell
287
+ # Check PowerShell version
288
+ $PSVersionTable.PSVersion
289
+
290
+ # Ensure using pwsh (PowerShell Core), not powershell (Windows PowerShell)
291
+ which pwsh
292
+ ```
293
+
294
+ ## References
295
+
296
+ - [PowerShell Documentation](https://docs.microsoft.com/powershell/) - Official documentation
297
+ - [PowerShell Gallery](https://www.powershellgallery.com/) - Module repository
298
+ - [Az PowerShell Module](https://docs.microsoft.com/powershell/azure/) - Azure management
299
+ - [AWS Tools for PowerShell](https://aws.amazon.com/powershell/) - AWS management
300
+ - [Pester Documentation](https://pester.dev/) - Testing framework
301
+ - [PSScriptAnalyzer](https://github.com/PowerShell/PSScriptAnalyzer) - Code analyzer
302
+
303
+ **Related Overlays:**
304
+
305
+ - `azure-cli` - Azure CLI (complementary to Az module)
306
+ - `aws-cli` - AWS CLI (complementary to AWS.Tools)
307
+ - `kubectl-helm` - Kubernetes management
308
+ - `docker-sock` - Docker management
309
+
310
+ ## Notes
311
+
312
+ - **PowerShell Core vs Windows PowerShell:** This overlay installs PowerShell Core (pwsh), the cross-platform version
313
+ - **Compatibility:** Most Windows PowerShell scripts work with PowerShell Core, but some Windows-specific features may not be available
314
+ - **Module Scope:** Modules are installed with `-Scope CurrentUser` to avoid permission issues
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json",
3
+ "features": {
4
+ "ghcr.io/devcontainers/features/powershell:1": {
5
+ "version": "latest"
6
+ }
7
+ },
8
+ "customizations": {
9
+ "vscode": {
10
+ "extensions": ["ms-vscode.powershell"],
11
+ "settings": {
12
+ "powershell.integratedConsole.focusConsoleOnExecute": false,
13
+ "[powershell]": {
14
+ "editor.formatOnSave": true
15
+ }
16
+ }
17
+ }
18
+ },
19
+ "remoteEnv": {
20
+ "PSModulePath": "${containerEnv:HOME}/.local/share/powershell/Modules:${containerEnv:PSModulePath}"
21
+ }
22
+ }
@@ -0,0 +1,13 @@
1
+ id: powershell
2
+ name: PowerShell
3
+ description: PowerShell Core for cross-platform scripting and automation
4
+ category: language
5
+ supports: []
6
+ requires: []
7
+ suggests: []
8
+ conflicts: []
9
+ tags:
10
+ - language
11
+ - powershell
12
+ - scripting
13
+ ports: []
@@ -0,0 +1,29 @@
1
+ #!/bin/bash
2
+ # PowerShell setup script - Install common PowerShell modules
3
+
4
+ set -e
5
+
6
+ echo "🔧 Setting up PowerShell development environment..."
7
+
8
+ # Verify PowerShell is installed
9
+ if command -v pwsh &> /dev/null; then
10
+ PWSH_VERSION=$(pwsh -NoProfile -Command '$PSVersionTable.PSVersion.ToString()')
11
+ echo "✓ PowerShell found: v$PWSH_VERSION"
12
+ else
13
+ echo "⚠️ PowerShell not found"
14
+ exit 1
15
+ fi
16
+
17
+ # Install common PowerShell modules
18
+ echo "📦 Installing PowerShell modules..."
19
+
20
+ # PSScriptAnalyzer (Linting and best practices)
21
+ pwsh -NoProfile -Command 'Install-Module -Name PSScriptAnalyzer -Force -Scope CurrentUser -AllowClobber' || echo "⚠️ PSScriptAnalyzer installation failed"
22
+
23
+ # Pester (Testing framework)
24
+ pwsh -NoProfile -Command 'Install-Module -Name Pester -Force -Scope CurrentUser -AllowClobber -SkipPublisherCheck' || echo "⚠️ Pester installation failed"
25
+
26
+ # PowerShellGet (Module management)
27
+ pwsh -NoProfile -Command 'Install-Module -Name PowerShellGet -Force -Scope CurrentUser -AllowClobber' || echo "⚠️ PowerShellGet installation failed"
28
+
29
+ echo "✓ PowerShell setup complete"
@@ -0,0 +1,38 @@
1
+ #!/bin/bash
2
+ # Verification script for PowerShell overlay
3
+
4
+ set -e
5
+
6
+ echo "🔍 Verifying PowerShell overlay..."
7
+ echo ""
8
+
9
+ # Check PowerShell is installed
10
+ echo "1️⃣ Checking PowerShell..."
11
+ if command -v pwsh &> /dev/null; then
12
+ pwsh -NoProfile -Command '$PSVersionTable.PSVersion'
13
+ echo " ✅ PowerShell found"
14
+ else
15
+ echo " ❌ PowerShell not found"
16
+ exit 1
17
+ fi
18
+
19
+ # Check PSScriptAnalyzer module
20
+ echo ""
21
+ echo "2️⃣ Checking PSScriptAnalyzer..."
22
+ if pwsh -NoProfile -Command 'Get-Module -ListAvailable -Name PSScriptAnalyzer' | grep -q "PSScriptAnalyzer"; then
23
+ echo " ✅ PSScriptAnalyzer installed"
24
+ else
25
+ echo " ⚠️ PSScriptAnalyzer not found"
26
+ fi
27
+
28
+ # Check Pester module
29
+ echo ""
30
+ echo "3️⃣ Checking Pester..."
31
+ if pwsh -NoProfile -Command 'Get-Module -ListAvailable -Name Pester' | grep -q "Pester"; then
32
+ echo " ✅ Pester installed"
33
+ else
34
+ echo " ⚠️ Pester not found"
35
+ fi
36
+
37
+ echo ""
38
+ echo "✅ PowerShell overlay verification complete"
@@ -0,0 +1,263 @@
1
+ # Pre-commit Framework Overlay
2
+
3
+ Automated code quality gates with the pre-commit framework.
4
+
5
+ ## What's Included
6
+
7
+ - **pre-commit framework** - Git hook scripts for identifying issues
8
+ - **Sample configuration** - Ready-to-use `.pre-commit-config.yaml`
9
+ - **Common hooks** - Language-agnostic file checks
10
+ - **Language-specific hooks** - Commented examples for Python, JavaScript, Shell
11
+
12
+ ## Quick Start
13
+
14
+ The overlay automatically:
15
+
16
+ 1. Installs the pre-commit framework
17
+ 2. Creates a sample `.pre-commit-config.yaml` (if not present)
18
+ 3. Installs pre-commit hooks in your Git repository
19
+
20
+ ## Configuration
21
+
22
+ ### Sample Configuration
23
+
24
+ A comprehensive `.pre-commit-config.yaml` is created with:
25
+
26
+ **General Hooks** (enabled by default):
27
+
28
+ - `trailing-whitespace` - Remove trailing whitespace
29
+ - `end-of-file-fixer` - Ensure files end with newline
30
+ - `check-yaml` - Validate YAML syntax
31
+ - `check-json` - Validate JSON syntax
32
+ - `check-toml` - Validate TOML syntax
33
+ - `check-added-large-files` - Prevent large files (>1MB)
34
+ - `check-case-conflict` - Prevent case-insensitive conflicts
35
+ - `check-merge-conflict` - Detect merge conflict markers
36
+ - `detect-private-key` - Prevent committing private keys
37
+ - `mixed-line-ending` - Normalize line endings to LF
38
+ - `markdownlint` - Markdown linting with auto-fix
39
+
40
+ **Language-Specific Hooks** (commented out - uncomment as needed):
41
+
42
+ - Python: black, isort, flake8
43
+ - JavaScript/TypeScript: ESLint, Prettier
44
+ - Dockerfile: hadolint
45
+ - Shell: shellcheck
46
+
47
+ ### Customizing Configuration
48
+
49
+ Edit `.pre-commit-config.yaml` to:
50
+
51
+ - Add/remove hooks
52
+ - Configure hook arguments
53
+ - Update hook versions
54
+
55
+ Example - Enable Python hooks:
56
+
57
+ ```yaml
58
+ repos:
59
+ - repo: https://github.com/psf/black
60
+ rev: 24.2.0
61
+ hooks:
62
+ - id: black
63
+ ```
64
+
65
+ ## Usage
66
+
67
+ ### Install Hooks
68
+
69
+ If not auto-installed during setup:
70
+
71
+ ```bash
72
+ pre-commit install
73
+ ```
74
+
75
+ ### Run Manually
76
+
77
+ ```bash
78
+ # Run on all files
79
+ pre-commit run --all-files
80
+
81
+ # Run on staged files only
82
+ pre-commit run
83
+
84
+ # Run specific hook
85
+ pre-commit run trailing-whitespace
86
+
87
+ # Run on specific files
88
+ pre-commit run --files path/to/file.py
89
+ ```
90
+
91
+ ### Update Hooks
92
+
93
+ Update hook versions to latest:
94
+
95
+ ```bash
96
+ pre-commit autoupdate
97
+ ```
98
+
99
+ ### Skip Hooks
100
+
101
+ Skip hooks for a specific commit:
102
+
103
+ ```bash
104
+ git commit --no-verify
105
+ # or
106
+ git commit -n
107
+ ```
108
+
109
+ Skip specific hook:
110
+
111
+ ```yaml
112
+ # In .pre-commit-config.yaml
113
+ - id: trailing-whitespace
114
+ skip: true # Temporarily skip this hook
115
+ ```
116
+
117
+ ## Common Hooks
118
+
119
+ ### File Safety Hooks
120
+
121
+ - **check-added-large-files**: Prevents commits of files >1MB
122
+ - **detect-private-key**: Scans for private keys/secrets
123
+ - **check-case-conflict**: Prevents case-sensitivity issues
124
+
125
+ ### File Format Hooks
126
+
127
+ - **trailing-whitespace**: Removes trailing spaces
128
+ - **end-of-file-fixer**: Ensures newline at end of file
129
+ - **mixed-line-ending**: Normalizes to LF (Unix style)
130
+
131
+ ### Syntax Validation
132
+
133
+ - **check-yaml**: Validates YAML files (safe mode)
134
+ - **check-json**: Validates JSON syntax
135
+ - **check-toml**: Validates TOML syntax
136
+
137
+ ### Merge Safety
138
+
139
+ - **check-merge-conflict**: Detects `<<<<<<` markers
140
+ - **check-executables-have-shebangs**: Ensures scripts have `#!/...`
141
+
142
+ ## Integration with CI/CD
143
+
144
+ Run pre-commit in CI pipelines:
145
+
146
+ ```yaml
147
+ # GitHub Actions example
148
+ - name: Run pre-commit
149
+ uses: pre-commit/action@v3.0.0
150
+ ```
151
+
152
+ Or manually:
153
+
154
+ ```bash
155
+ # In CI script
156
+ pre-commit run --all-files
157
+ ```
158
+
159
+ ## Language-Specific Examples
160
+
161
+ ### Python Project
162
+
163
+ Uncomment in `.pre-commit-config.yaml`:
164
+
165
+ ```yaml
166
+ - repo: https://github.com/psf/black
167
+ rev: 24.2.0
168
+ hooks:
169
+ - id: black
170
+
171
+ - repo: https://github.com/pycqa/isort
172
+ rev: 5.13.2
173
+ hooks:
174
+ - id: isort
175
+ args: [--profile, black]
176
+ ```
177
+
178
+ ### JavaScript/TypeScript Project
179
+
180
+ Uncomment in `.pre-commit-config.yaml`:
181
+
182
+ ```yaml
183
+ - repo: https://github.com/pre-commit/mirrors-prettier
184
+ rev: v3.1.0
185
+ hooks:
186
+ - id: prettier
187
+ types_or: [javascript, jsx, ts, tsx, json, yaml, markdown]
188
+ ```
189
+
190
+ ### Shell Scripts
191
+
192
+ Uncomment in `.pre-commit-config.yaml`:
193
+
194
+ ```yaml
195
+ - repo: https://github.com/shellcheck-py/shellcheck-py
196
+ rev: v0.9.0.6
197
+ hooks:
198
+ - id: shellcheck
199
+ ```
200
+
201
+ ## Troubleshooting
202
+
203
+ ### Hooks Not Running
204
+
205
+ Ensure hooks are installed:
206
+
207
+ ```bash
208
+ pre-commit install
209
+ ```
210
+
211
+ ### Hook Failures
212
+
213
+ Run with verbose output:
214
+
215
+ ```bash
216
+ pre-commit run --all-files --verbose
217
+ ```
218
+
219
+ ### Clearing Hook Cache
220
+
221
+ Remove cached hook environments:
222
+
223
+ ```bash
224
+ pre-commit clean
225
+ pre-commit install-hooks
226
+ ```
227
+
228
+ ### Updating Hook Versions
229
+
230
+ ```bash
231
+ pre-commit autoupdate
232
+ ```
233
+
234
+ ## Best Practices
235
+
236
+ 1. **Run before first commit**: `pre-commit run --all-files`
237
+ 2. **Update regularly**: `pre-commit autoupdate` monthly
238
+ 3. **Team consistency**: Commit `.pre-commit-config.yaml` to version control
239
+ 4. **CI validation**: Run pre-commit in CI to enforce on PRs
240
+ 5. **Skip sparingly**: Use `--no-verify` only when necessary
241
+
242
+ ## Performance Tips
243
+
244
+ - Use `files` regex to limit hook scope
245
+ - Enable `fail_fast: true` to stop on first failure
246
+ - Use `stages: [commit]` to run only on commit (not push)
247
+
248
+ Example:
249
+
250
+ ```yaml
251
+ repos:
252
+ - repo: https://github.com/pre-commit/pre-commit-hooks
253
+ rev: v4.5.0
254
+ hooks:
255
+ - id: trailing-whitespace
256
+ files: \.(py|js|ts)$ # Only Python and JS files
257
+ ```
258
+
259
+ ## Additional Resources
260
+
261
+ - [Pre-commit Documentation](https://pre-commit.com)
262
+ - [Supported Hooks](https://pre-commit.com/hooks.html)
263
+ - [Creating Custom Hooks](https://pre-commit.com/#new-hooks)
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json",
3
+ "features": {
4
+ "ghcr.io/devcontainers/features/python:1": {
5
+ "version": "3.12",
6
+ "installTools": true
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,16 @@
1
+ id: pre-commit
2
+ name: Pre-commit Framework
3
+ description: Automated code quality gates with pre-commit hooks
4
+ category: dev
5
+ supports: []
6
+ requires:
7
+ - python
8
+ suggests:
9
+ - commitlint
10
+ conflicts: []
11
+ tags:
12
+ - dev
13
+ - git
14
+ - quality
15
+ - hooks
16
+ ports: []