@factiii/stack 0.1.2

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 (400) hide show
  1. package/README.md +420 -0
  2. package/bin/factiii +229 -0
  3. package/dist/cli/check-config.d.ts +9 -0
  4. package/dist/cli/check-config.d.ts.map +1 -0
  5. package/dist/cli/check-config.js +19 -0
  6. package/dist/cli/check-config.js.map +1 -0
  7. package/dist/cli/deploy-secrets.d.ts +16 -0
  8. package/dist/cli/deploy-secrets.d.ts.map +1 -0
  9. package/dist/cli/deploy-secrets.js +227 -0
  10. package/dist/cli/deploy-secrets.js.map +1 -0
  11. package/dist/cli/deploy.d.ts +30 -0
  12. package/dist/cli/deploy.d.ts.map +1 -0
  13. package/dist/cli/deploy.js +306 -0
  14. package/dist/cli/deploy.js.map +1 -0
  15. package/dist/cli/deployer.d.ts +13 -0
  16. package/dist/cli/deployer.d.ts.map +1 -0
  17. package/dist/cli/deployer.js +21 -0
  18. package/dist/cli/deployer.js.map +1 -0
  19. package/dist/cli/dev-sync.d.ts +30 -0
  20. package/dist/cli/dev-sync.d.ts.map +1 -0
  21. package/dist/cli/dev-sync.js +500 -0
  22. package/dist/cli/dev-sync.js.map +1 -0
  23. package/dist/cli/execute-plugin-command.d.ts +25 -0
  24. package/dist/cli/execute-plugin-command.d.ts.map +1 -0
  25. package/dist/cli/execute-plugin-command.js +237 -0
  26. package/dist/cli/execute-plugin-command.js.map +1 -0
  27. package/dist/cli/fix.d.ts +22 -0
  28. package/dist/cli/fix.d.ts.map +1 -0
  29. package/dist/cli/fix.js +267 -0
  30. package/dist/cli/fix.js.map +1 -0
  31. package/dist/cli/index.d.ts +17 -0
  32. package/dist/cli/index.d.ts.map +1 -0
  33. package/dist/cli/index.js +31 -0
  34. package/dist/cli/index.js.map +1 -0
  35. package/dist/cli/init.d.ts +9 -0
  36. package/dist/cli/init.d.ts.map +1 -0
  37. package/dist/cli/init.js +190 -0
  38. package/dist/cli/init.js.map +1 -0
  39. package/dist/cli/plugin-commands.d.ts +22 -0
  40. package/dist/cli/plugin-commands.d.ts.map +1 -0
  41. package/dist/cli/plugin-commands.js +121 -0
  42. package/dist/cli/plugin-commands.js.map +1 -0
  43. package/dist/cli/scan.d.ts +66 -0
  44. package/dist/cli/scan.d.ts.map +1 -0
  45. package/dist/cli/scan.js +511 -0
  46. package/dist/cli/scan.js.map +1 -0
  47. package/dist/cli/secrets.d.ts +19 -0
  48. package/dist/cli/secrets.d.ts.map +1 -0
  49. package/dist/cli/secrets.js +318 -0
  50. package/dist/cli/secrets.js.map +1 -0
  51. package/dist/cli/undeploy.d.ts +9 -0
  52. package/dist/cli/undeploy.d.ts.map +1 -0
  53. package/dist/cli/undeploy.js +95 -0
  54. package/dist/cli/undeploy.js.map +1 -0
  55. package/dist/cli/upgrade.d.ts +9 -0
  56. package/dist/cli/upgrade.d.ts.map +1 -0
  57. package/dist/cli/upgrade.js +24 -0
  58. package/dist/cli/upgrade.js.map +1 -0
  59. package/dist/cli/validate.d.ts +9 -0
  60. package/dist/cli/validate.d.ts.map +1 -0
  61. package/dist/cli/validate.js +20 -0
  62. package/dist/cli/validate.js.map +1 -0
  63. package/dist/generators/generate-factiii-auto.d.ts +31 -0
  64. package/dist/generators/generate-factiii-auto.d.ts.map +1 -0
  65. package/dist/generators/generate-factiii-auto.js +251 -0
  66. package/dist/generators/generate-factiii-auto.js.map +1 -0
  67. package/dist/generators/generate-factiii-yml.d.ts +23 -0
  68. package/dist/generators/generate-factiii-yml.d.ts.map +1 -0
  69. package/dist/generators/generate-factiii-yml.js +228 -0
  70. package/dist/generators/generate-factiii-yml.js.map +1 -0
  71. package/dist/generators/index.d.ts +8 -0
  72. package/dist/generators/index.d.ts.map +1 -0
  73. package/dist/generators/index.js +14 -0
  74. package/dist/generators/index.js.map +1 -0
  75. package/dist/index.d.ts +39 -0
  76. package/dist/index.d.ts.map +1 -0
  77. package/dist/index.js +90 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/plugins/addons/server-mode/index.d.ts +57 -0
  80. package/dist/plugins/addons/server-mode/index.d.ts.map +1 -0
  81. package/dist/plugins/addons/server-mode/index.js +136 -0
  82. package/dist/plugins/addons/server-mode/index.js.map +1 -0
  83. package/dist/plugins/addons/server-mode/scanfix/mac.d.ts +17 -0
  84. package/dist/plugins/addons/server-mode/scanfix/mac.d.ts.map +1 -0
  85. package/dist/plugins/addons/server-mode/scanfix/mac.js +461 -0
  86. package/dist/plugins/addons/server-mode/scanfix/mac.js.map +1 -0
  87. package/dist/plugins/addons/server-mode/scanfix/ubuntu.d.ts +12 -0
  88. package/dist/plugins/addons/server-mode/scanfix/ubuntu.d.ts.map +1 -0
  89. package/dist/plugins/addons/server-mode/scanfix/ubuntu.js +246 -0
  90. package/dist/plugins/addons/server-mode/scanfix/ubuntu.js.map +1 -0
  91. package/dist/plugins/addons/server-mode/scanfix/windows.d.ts +14 -0
  92. package/dist/plugins/addons/server-mode/scanfix/windows.d.ts.map +1 -0
  93. package/dist/plugins/addons/server-mode/scanfix/windows.js +113 -0
  94. package/dist/plugins/addons/server-mode/scanfix/windows.js.map +1 -0
  95. package/dist/plugins/approved.json +13 -0
  96. package/dist/plugins/frameworks/prisma-trpc/index.d.ts +65 -0
  97. package/dist/plugins/frameworks/prisma-trpc/index.d.ts.map +1 -0
  98. package/dist/plugins/frameworks/prisma-trpc/index.js +668 -0
  99. package/dist/plugins/frameworks/prisma-trpc/index.js.map +1 -0
  100. package/dist/plugins/index.d.ts +101 -0
  101. package/dist/plugins/index.d.ts.map +1 -0
  102. package/dist/plugins/index.js +411 -0
  103. package/dist/plugins/index.js.map +1 -0
  104. package/dist/plugins/interfaces/addon.d.ts +43 -0
  105. package/dist/plugins/interfaces/addon.d.ts.map +1 -0
  106. package/dist/plugins/interfaces/addon.js +53 -0
  107. package/dist/plugins/interfaces/addon.js.map +1 -0
  108. package/dist/plugins/interfaces/framework.d.ts +43 -0
  109. package/dist/plugins/interfaces/framework.d.ts.map +1 -0
  110. package/dist/plugins/interfaces/framework.js +53 -0
  111. package/dist/plugins/interfaces/framework.js.map +1 -0
  112. package/dist/plugins/interfaces/index.d.ts +10 -0
  113. package/dist/plugins/interfaces/index.d.ts.map +1 -0
  114. package/dist/plugins/interfaces/index.js +17 -0
  115. package/dist/plugins/interfaces/index.js.map +1 -0
  116. package/dist/plugins/interfaces/pipeline.d.ts +78 -0
  117. package/dist/plugins/interfaces/pipeline.d.ts.map +1 -0
  118. package/dist/plugins/interfaces/pipeline.js +82 -0
  119. package/dist/plugins/interfaces/pipeline.js.map +1 -0
  120. package/dist/plugins/interfaces/server.d.ts +65 -0
  121. package/dist/plugins/interfaces/server.d.ts.map +1 -0
  122. package/dist/plugins/interfaces/server.js +72 -0
  123. package/dist/plugins/interfaces/server.js.map +1 -0
  124. package/dist/plugins/pipelines/aws/configs/ec2.d.ts +9 -0
  125. package/dist/plugins/pipelines/aws/configs/ec2.d.ts.map +1 -0
  126. package/dist/plugins/pipelines/aws/configs/ec2.js +34 -0
  127. package/dist/plugins/pipelines/aws/configs/ec2.js.map +1 -0
  128. package/dist/plugins/pipelines/aws/configs/free-tier.d.ts +13 -0
  129. package/dist/plugins/pipelines/aws/configs/free-tier.d.ts.map +1 -0
  130. package/dist/plugins/pipelines/aws/configs/free-tier.js +86 -0
  131. package/dist/plugins/pipelines/aws/configs/free-tier.js.map +1 -0
  132. package/dist/plugins/pipelines/aws/configs/index.d.ts +14 -0
  133. package/dist/plugins/pipelines/aws/configs/index.d.ts.map +1 -0
  134. package/dist/plugins/pipelines/aws/configs/index.js +21 -0
  135. package/dist/plugins/pipelines/aws/configs/index.js.map +1 -0
  136. package/dist/plugins/pipelines/aws/configs/types.d.ts +36 -0
  137. package/dist/plugins/pipelines/aws/configs/types.d.ts.map +1 -0
  138. package/dist/plugins/pipelines/aws/configs/types.js +9 -0
  139. package/dist/plugins/pipelines/aws/configs/types.js.map +1 -0
  140. package/dist/plugins/pipelines/aws/dev.d.ts +10 -0
  141. package/dist/plugins/pipelines/aws/dev.d.ts.map +1 -0
  142. package/dist/plugins/pipelines/aws/dev.js +70 -0
  143. package/dist/plugins/pipelines/aws/dev.js.map +1 -0
  144. package/dist/plugins/pipelines/aws/index.d.ts +118 -0
  145. package/dist/plugins/pipelines/aws/index.d.ts.map +1 -0
  146. package/dist/plugins/pipelines/aws/index.js +346 -0
  147. package/dist/plugins/pipelines/aws/index.js.map +1 -0
  148. package/dist/plugins/pipelines/aws/prod.d.ts +19 -0
  149. package/dist/plugins/pipelines/aws/prod.d.ts.map +1 -0
  150. package/dist/plugins/pipelines/aws/prod.js +362 -0
  151. package/dist/plugins/pipelines/aws/prod.js.map +1 -0
  152. package/dist/plugins/pipelines/aws/scanfix/aws-cli.d.ts +7 -0
  153. package/dist/plugins/pipelines/aws/scanfix/aws-cli.d.ts.map +1 -0
  154. package/dist/plugins/pipelines/aws/scanfix/aws-cli.js +31 -0
  155. package/dist/plugins/pipelines/aws/scanfix/aws-cli.js.map +1 -0
  156. package/dist/plugins/pipelines/aws/scanfix/config.d.ts +7 -0
  157. package/dist/plugins/pipelines/aws/scanfix/config.d.ts.map +1 -0
  158. package/dist/plugins/pipelines/aws/scanfix/config.js +134 -0
  159. package/dist/plugins/pipelines/aws/scanfix/config.js.map +1 -0
  160. package/dist/plugins/pipelines/factiii/github-secrets-store.d.ts +65 -0
  161. package/dist/plugins/pipelines/factiii/github-secrets-store.d.ts.map +1 -0
  162. package/dist/plugins/pipelines/factiii/github-secrets-store.js +221 -0
  163. package/dist/plugins/pipelines/factiii/github-secrets-store.js.map +1 -0
  164. package/dist/plugins/pipelines/factiii/index.d.ts +195 -0
  165. package/dist/plugins/pipelines/factiii/index.d.ts.map +1 -0
  166. package/dist/plugins/pipelines/factiii/index.js +862 -0
  167. package/dist/plugins/pipelines/factiii/index.js.map +1 -0
  168. package/dist/plugins/pipelines/factiii/prod.d.ts +17 -0
  169. package/dist/plugins/pipelines/factiii/prod.d.ts.map +1 -0
  170. package/dist/plugins/pipelines/factiii/prod.js +282 -0
  171. package/dist/plugins/pipelines/factiii/prod.js.map +1 -0
  172. package/dist/plugins/pipelines/factiii/scanfix/config.d.ts +7 -0
  173. package/dist/plugins/pipelines/factiii/scanfix/config.d.ts.map +1 -0
  174. package/dist/plugins/pipelines/factiii/scanfix/config.js +80 -0
  175. package/dist/plugins/pipelines/factiii/scanfix/config.js.map +1 -0
  176. package/dist/plugins/pipelines/factiii/scanfix/github-cli.d.ts +7 -0
  177. package/dist/plugins/pipelines/factiii/scanfix/github-cli.d.ts.map +1 -0
  178. package/dist/plugins/pipelines/factiii/scanfix/github-cli.js +43 -0
  179. package/dist/plugins/pipelines/factiii/scanfix/github-cli.js.map +1 -0
  180. package/dist/plugins/pipelines/factiii/scanfix/secrets.d.ts +7 -0
  181. package/dist/plugins/pipelines/factiii/scanfix/secrets.d.ts.map +1 -0
  182. package/dist/plugins/pipelines/factiii/scanfix/secrets.js +237 -0
  183. package/dist/plugins/pipelines/factiii/scanfix/secrets.js.map +1 -0
  184. package/dist/plugins/pipelines/factiii/scanfix/workflows.d.ts +7 -0
  185. package/dist/plugins/pipelines/factiii/scanfix/workflows.d.ts.map +1 -0
  186. package/dist/plugins/pipelines/factiii/scanfix/workflows.js +169 -0
  187. package/dist/plugins/pipelines/factiii/scanfix/workflows.js.map +1 -0
  188. package/dist/plugins/pipelines/factiii/staging.d.ts +25 -0
  189. package/dist/plugins/pipelines/factiii/staging.d.ts.map +1 -0
  190. package/dist/plugins/pipelines/factiii/staging.js +223 -0
  191. package/dist/plugins/pipelines/factiii/staging.js.map +1 -0
  192. package/dist/plugins/pipelines/factiii/utils/detection.d.ts +36 -0
  193. package/dist/plugins/pipelines/factiii/utils/detection.d.ts.map +1 -0
  194. package/dist/plugins/pipelines/factiii/utils/detection.js +140 -0
  195. package/dist/plugins/pipelines/factiii/utils/detection.js.map +1 -0
  196. package/dist/plugins/pipelines/factiii/utils/workflows.d.ts +16 -0
  197. package/dist/plugins/pipelines/factiii/utils/workflows.d.ts.map +1 -0
  198. package/dist/plugins/pipelines/factiii/utils/workflows.js +129 -0
  199. package/dist/plugins/pipelines/factiii/utils/workflows.js.map +1 -0
  200. package/dist/plugins/pipelines/factiii/workflows/factiii-cicd-prod.yml +112 -0
  201. package/dist/plugins/pipelines/factiii/workflows/factiii-cicd-staging.yml +112 -0
  202. package/dist/plugins/pipelines/factiii/workflows/factiii-command.yml +130 -0
  203. package/dist/plugins/pipelines/factiii/workflows/factiii-deploy.yml +198 -0
  204. package/dist/plugins/pipelines/factiii/workflows/factiii-dev-sync.yml +179 -0
  205. package/dist/plugins/pipelines/factiii/workflows/factiii-fix.yml +176 -0
  206. package/dist/plugins/pipelines/factiii/workflows/factiii-scan.yml +176 -0
  207. package/dist/plugins/pipelines/factiii/workflows/factiii-undeploy.yml +95 -0
  208. package/dist/plugins/servers/amazon-linux/index.d.ts +93 -0
  209. package/dist/plugins/servers/amazon-linux/index.d.ts.map +1 -0
  210. package/dist/plugins/servers/amazon-linux/index.js +217 -0
  211. package/dist/plugins/servers/amazon-linux/index.js.map +1 -0
  212. package/dist/plugins/servers/mac/dev.d.ts +10 -0
  213. package/dist/plugins/servers/mac/dev.d.ts.map +1 -0
  214. package/dist/plugins/servers/mac/dev.js +71 -0
  215. package/dist/plugins/servers/mac/dev.js.map +1 -0
  216. package/dist/plugins/servers/mac/index.d.ts +101 -0
  217. package/dist/plugins/servers/mac/index.d.ts.map +1 -0
  218. package/dist/plugins/servers/mac/index.js +257 -0
  219. package/dist/plugins/servers/mac/index.js.map +1 -0
  220. package/dist/plugins/servers/mac/scanfix/config.d.ts +7 -0
  221. package/dist/plugins/servers/mac/scanfix/config.d.ts.map +1 -0
  222. package/dist/plugins/servers/mac/scanfix/config.js +168 -0
  223. package/dist/plugins/servers/mac/scanfix/config.js.map +1 -0
  224. package/dist/plugins/servers/mac/scanfix/containers.d.ts +7 -0
  225. package/dist/plugins/servers/mac/scanfix/containers.d.ts.map +1 -0
  226. package/dist/plugins/servers/mac/scanfix/containers.js +167 -0
  227. package/dist/plugins/servers/mac/scanfix/containers.js.map +1 -0
  228. package/dist/plugins/servers/mac/scanfix/system.d.ts +7 -0
  229. package/dist/plugins/servers/mac/scanfix/system.d.ts.map +1 -0
  230. package/dist/plugins/servers/mac/scanfix/system.js +144 -0
  231. package/dist/plugins/servers/mac/scanfix/system.js.map +1 -0
  232. package/dist/plugins/servers/mac/staging.d.ts +21 -0
  233. package/dist/plugins/servers/mac/staging.d.ts.map +1 -0
  234. package/dist/plugins/servers/mac/staging.js +708 -0
  235. package/dist/plugins/servers/mac/staging.js.map +1 -0
  236. package/dist/plugins/servers/ubuntu/index.d.ts +93 -0
  237. package/dist/plugins/servers/ubuntu/index.d.ts.map +1 -0
  238. package/dist/plugins/servers/ubuntu/index.js +224 -0
  239. package/dist/plugins/servers/ubuntu/index.js.map +1 -0
  240. package/dist/plugins/servers/windows/index.d.ts +90 -0
  241. package/dist/plugins/servers/windows/index.d.ts.map +1 -0
  242. package/dist/plugins/servers/windows/index.js +205 -0
  243. package/dist/plugins/servers/windows/index.js.map +1 -0
  244. package/dist/scanfix/commands/index.d.ts +27 -0
  245. package/dist/scanfix/commands/index.d.ts.map +1 -0
  246. package/dist/scanfix/commands/index.js +97 -0
  247. package/dist/scanfix/commands/index.js.map +1 -0
  248. package/dist/scanfix/commands/mac.d.ts +11 -0
  249. package/dist/scanfix/commands/mac.d.ts.map +1 -0
  250. package/dist/scanfix/commands/mac.js +31 -0
  251. package/dist/scanfix/commands/mac.js.map +1 -0
  252. package/dist/scanfix/commands/ubuntu.d.ts +11 -0
  253. package/dist/scanfix/commands/ubuntu.d.ts.map +1 -0
  254. package/dist/scanfix/commands/ubuntu.js +30 -0
  255. package/dist/scanfix/commands/ubuntu.js.map +1 -0
  256. package/dist/scanfix/fixes/certbot.d.ts +25 -0
  257. package/dist/scanfix/fixes/certbot.d.ts.map +1 -0
  258. package/dist/scanfix/fixes/certbot.js +136 -0
  259. package/dist/scanfix/fixes/certbot.js.map +1 -0
  260. package/dist/scanfix/fixes/docker.d.ts +29 -0
  261. package/dist/scanfix/fixes/docker.d.ts.map +1 -0
  262. package/dist/scanfix/fixes/docker.js +149 -0
  263. package/dist/scanfix/fixes/docker.js.map +1 -0
  264. package/dist/scanfix/fixes/git.d.ts +20 -0
  265. package/dist/scanfix/fixes/git.d.ts.map +1 -0
  266. package/dist/scanfix/fixes/git.js +71 -0
  267. package/dist/scanfix/fixes/git.js.map +1 -0
  268. package/dist/scanfix/fixes/index.d.ts +11 -0
  269. package/dist/scanfix/fixes/index.d.ts.map +1 -0
  270. package/dist/scanfix/fixes/index.js +27 -0
  271. package/dist/scanfix/fixes/index.js.map +1 -0
  272. package/dist/scanfix/fixes/node.d.ts +20 -0
  273. package/dist/scanfix/fixes/node.d.ts.map +1 -0
  274. package/dist/scanfix/fixes/node.js +71 -0
  275. package/dist/scanfix/fixes/node.js.map +1 -0
  276. package/dist/scanfix/fixes/pnpm.d.ts +20 -0
  277. package/dist/scanfix/fixes/pnpm.d.ts.map +1 -0
  278. package/dist/scanfix/fixes/pnpm.js +122 -0
  279. package/dist/scanfix/fixes/pnpm.js.map +1 -0
  280. package/dist/scanfix/index.d.ts +23 -0
  281. package/dist/scanfix/index.d.ts.map +1 -0
  282. package/dist/scanfix/index.js +44 -0
  283. package/dist/scanfix/index.js.map +1 -0
  284. package/dist/scanfix/platform.d.ts +20 -0
  285. package/dist/scanfix/platform.d.ts.map +1 -0
  286. package/dist/scanfix/platform.js +48 -0
  287. package/dist/scanfix/platform.js.map +1 -0
  288. package/dist/scanfix/ssl-cert-helper.d.ts +27 -0
  289. package/dist/scanfix/ssl-cert-helper.d.ts.map +1 -0
  290. package/dist/scanfix/ssl-cert-helper.js +117 -0
  291. package/dist/scanfix/ssl-cert-helper.js.map +1 -0
  292. package/dist/scanfix/types.d.ts +27 -0
  293. package/dist/scanfix/types.d.ts.map +1 -0
  294. package/dist/scanfix/types.js +8 -0
  295. package/dist/scanfix/types.js.map +1 -0
  296. package/dist/scripts/check-existing-secrets.d.ts +6 -0
  297. package/dist/scripts/check-existing-secrets.d.ts.map +1 -0
  298. package/dist/scripts/check-existing-secrets.js +86 -0
  299. package/dist/scripts/check-existing-secrets.js.map +1 -0
  300. package/dist/scripts/generate-all.d.ts +40 -0
  301. package/dist/scripts/generate-all.d.ts.map +1 -0
  302. package/dist/scripts/generate-all.js +373 -0
  303. package/dist/scripts/generate-all.js.map +1 -0
  304. package/dist/scripts/get-repo-name.d.ts +6 -0
  305. package/dist/scripts/get-repo-name.d.ts.map +1 -0
  306. package/dist/scripts/get-repo-name.js +54 -0
  307. package/dist/scripts/get-repo-name.js.map +1 -0
  308. package/dist/scripts/index.d.ts +7 -0
  309. package/dist/scripts/index.d.ts.map +1 -0
  310. package/dist/scripts/index.js +14 -0
  311. package/dist/scripts/index.js.map +1 -0
  312. package/dist/scripts/validate-env-files.d.ts +6 -0
  313. package/dist/scripts/validate-env-files.d.ts.map +1 -0
  314. package/dist/scripts/validate-env-files.js +126 -0
  315. package/dist/scripts/validate-env-files.js.map +1 -0
  316. package/dist/scripts/validate-example-values.d.ts +8 -0
  317. package/dist/scripts/validate-example-values.d.ts.map +1 -0
  318. package/dist/scripts/validate-example-values.js +88 -0
  319. package/dist/scripts/validate-example-values.js.map +1 -0
  320. package/dist/scripts/validate-factiii-yml.d.ts +6 -0
  321. package/dist/scripts/validate-factiii-yml.d.ts.map +1 -0
  322. package/dist/scripts/validate-factiii-yml.js +71 -0
  323. package/dist/scripts/validate-factiii-yml.js.map +1 -0
  324. package/dist/types/cli.d.ts +138 -0
  325. package/dist/types/cli.d.ts.map +1 -0
  326. package/dist/types/cli.js +8 -0
  327. package/dist/types/cli.js.map +1 -0
  328. package/dist/types/config.d.ts +113 -0
  329. package/dist/types/config.d.ts.map +1 -0
  330. package/dist/types/config.js +8 -0
  331. package/dist/types/config.js.map +1 -0
  332. package/dist/types/index.d.ts +9 -0
  333. package/dist/types/index.d.ts.map +1 -0
  334. package/dist/types/index.js +25 -0
  335. package/dist/types/index.js.map +1 -0
  336. package/dist/types/plugin.d.ts +352 -0
  337. package/dist/types/plugin.d.ts.map +1 -0
  338. package/dist/types/plugin.js +8 -0
  339. package/dist/types/plugin.js.map +1 -0
  340. package/dist/utils/ansible-vault-secrets.d.ts +95 -0
  341. package/dist/utils/ansible-vault-secrets.d.ts.map +1 -0
  342. package/dist/utils/ansible-vault-secrets.js +406 -0
  343. package/dist/utils/ansible-vault-secrets.js.map +1 -0
  344. package/dist/utils/config-helpers.d.ts +72 -0
  345. package/dist/utils/config-helpers.d.ts.map +1 -0
  346. package/dist/utils/config-helpers.js +171 -0
  347. package/dist/utils/config-helpers.js.map +1 -0
  348. package/dist/utils/config-schema.d.ts +17 -0
  349. package/dist/utils/config-schema.d.ts.map +1 -0
  350. package/dist/utils/config-schema.js +100 -0
  351. package/dist/utils/config-schema.js.map +1 -0
  352. package/dist/utils/config-validator.d.ts +29 -0
  353. package/dist/utils/config-validator.d.ts.map +1 -0
  354. package/dist/utils/config-validator.js +146 -0
  355. package/dist/utils/config-validator.js.map +1 -0
  356. package/dist/utils/deployment-report.d.ts +100 -0
  357. package/dist/utils/deployment-report.d.ts.map +1 -0
  358. package/dist/utils/deployment-report.js +225 -0
  359. package/dist/utils/deployment-report.js.map +1 -0
  360. package/dist/utils/dns-validator.d.ts +19 -0
  361. package/dist/utils/dns-validator.d.ts.map +1 -0
  362. package/dist/utils/dns-validator.js +94 -0
  363. package/dist/utils/dns-validator.js.map +1 -0
  364. package/dist/utils/env-validator.d.ts +108 -0
  365. package/dist/utils/env-validator.d.ts.map +1 -0
  366. package/dist/utils/env-validator.js +342 -0
  367. package/dist/utils/env-validator.js.map +1 -0
  368. package/dist/utils/github-workflow-monitor.d.ts +49 -0
  369. package/dist/utils/github-workflow-monitor.d.ts.map +1 -0
  370. package/dist/utils/github-workflow-monitor.js +145 -0
  371. package/dist/utils/github-workflow-monitor.js.map +1 -0
  372. package/dist/utils/index.d.ts +18 -0
  373. package/dist/utils/index.d.ts.map +1 -0
  374. package/dist/utils/index.js +48 -0
  375. package/dist/utils/index.js.map +1 -0
  376. package/dist/utils/secret-prompts.d.ts +67 -0
  377. package/dist/utils/secret-prompts.d.ts.map +1 -0
  378. package/dist/utils/secret-prompts.js +369 -0
  379. package/dist/utils/secret-prompts.js.map +1 -0
  380. package/dist/utils/server-check.d.ts +43 -0
  381. package/dist/utils/server-check.d.ts.map +1 -0
  382. package/dist/utils/server-check.js +397 -0
  383. package/dist/utils/server-check.js.map +1 -0
  384. package/dist/utils/ssh-deploy.d.ts +70 -0
  385. package/dist/utils/ssh-deploy.d.ts.map +1 -0
  386. package/dist/utils/ssh-deploy.js +268 -0
  387. package/dist/utils/ssh-deploy.js.map +1 -0
  388. package/dist/utils/ssh-helper.d.ts +40 -0
  389. package/dist/utils/ssh-helper.d.ts.map +1 -0
  390. package/dist/utils/ssh-helper.js +221 -0
  391. package/dist/utils/ssh-helper.js.map +1 -0
  392. package/dist/utils/template-generator.d.ts +42 -0
  393. package/dist/utils/template-generator.d.ts.map +1 -0
  394. package/dist/utils/template-generator.js +223 -0
  395. package/dist/utils/template-generator.js.map +1 -0
  396. package/dist/utils/version-check.d.ts +69 -0
  397. package/dist/utils/version-check.d.ts.map +1 -0
  398. package/dist/utils/version-check.js +211 -0
  399. package/dist/utils/version-check.js.map +1 -0
  400. package/package.json +82 -0
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Amazon Linux Server Plugin
3
+ *
4
+ * Handles Amazon Linux-specific package management and commands.
5
+ * Used for deploying to AWS EC2 instances running Amazon Linux 2023.
6
+ *
7
+ * ============================================================
8
+ * PLUGIN STRUCTURE STANDARD
9
+ * ============================================================
10
+ *
11
+ * This plugin follows a standardized structure for clarity and maintainability:
12
+ *
13
+ * **scanfix/** - Scan/fix operations organized by concern
14
+ * - Each file exports an array of Fix[] objects
15
+ * - All fixes are combined in the main plugin class
16
+ *
17
+ * **index.ts** - Main plugin class
18
+ * - Static metadata (id, name, category, version, os, packageManager, serviceManager)
19
+ * - shouldLoad() - Determines if plugin should load
20
+ * - OS-specific installation commands
21
+ * ============================================================
22
+ */
23
+ import type { FactiiiConfig, EnvironmentConfig, DeployResult, EnsureServerReadyOptions, ServerOS, PackageManager, ServiceManager } from '../../../types/index.js';
24
+ declare class AmazonLinuxPlugin {
25
+ static readonly id = "amazon-linux";
26
+ static readonly name = "Amazon Linux Server";
27
+ static readonly category: 'server';
28
+ static readonly version = "1.0.0";
29
+ /** The OS this server plugin handles */
30
+ static readonly os: ServerOS;
31
+ /** Package manager for Amazon Linux (dnf for AL2023, yum for AL2) */
32
+ static readonly packageManager: PackageManager;
33
+ /** Service manager for Amazon Linux */
34
+ static readonly serviceManager: ServiceManager;
35
+ static readonly requiredEnvVars: string[];
36
+ static readonly configSchema: Record<string, unknown>;
37
+ static readonly autoConfigSchema: Record<string, string>;
38
+ /**
39
+ * Determine if this plugin should be loaded for this project
40
+ * Loads if config has environment with server: 'amazon-linux'
41
+ */
42
+ static shouldLoad(_rootDir: string, config: FactiiiConfig): Promise<boolean>;
43
+ static helpText: Record<string, string>;
44
+ static readonly fixes: {
45
+ os: ServerOS;
46
+ id: string;
47
+ stage: import("../../../types/plugin.js").Stage;
48
+ severity: import("../../../types/plugin.js").Severity;
49
+ description: string;
50
+ plugin?: string;
51
+ scan: (config: FactiiiConfig, rootDir: string) => Promise<boolean>;
52
+ fix?: ((config: FactiiiConfig, rootDir: string) => Promise<boolean>) | null;
53
+ manualFix: string;
54
+ }[];
55
+ /**
56
+ * Auto-detect Amazon Linux configuration
57
+ */
58
+ static detectConfig(_rootDir: string): Promise<{
59
+ ssh_user: string;
60
+ }>;
61
+ /**
62
+ * Execute a command on a remote server via SSH
63
+ */
64
+ static sshExec(envConfig: EnvironmentConfig, command: string): Promise<string>;
65
+ /**
66
+ * Get the command to install Docker on Amazon Linux 2023
67
+ */
68
+ static getDockerInstallCommand(): string;
69
+ /**
70
+ * Get the command to install Node.js on Amazon Linux
71
+ */
72
+ static getNodeInstallCommand(): string;
73
+ /**
74
+ * Get the command to install git on Amazon Linux
75
+ */
76
+ static getGitInstallCommand(): string;
77
+ private _config;
78
+ constructor(config: FactiiiConfig);
79
+ /**
80
+ * Ensure server is ready for deployment
81
+ */
82
+ ensureServerReady(config: FactiiiConfig, environment: string, options?: EnsureServerReadyOptions): Promise<DeployResult>;
83
+ /**
84
+ * Deploy to an environment
85
+ */
86
+ deploy(config: FactiiiConfig, environment: string): Promise<DeployResult>;
87
+ /**
88
+ * Undeploy from an environment
89
+ */
90
+ undeploy(config: FactiiiConfig, environment: string): Promise<DeployResult>;
91
+ }
92
+ export default AmazonLinuxPlugin;
93
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/servers/amazon-linux/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,wBAAwB,EACxB,QAAQ,EACR,cAAc,EACd,cAAc,EACf,MAAM,yBAAyB,CAAC;AAcjC,cAAM,iBAAiB;IAKrB,MAAM,CAAC,QAAQ,CAAC,EAAE,kBAAkB;IACpC,MAAM,CAAC,QAAQ,CAAC,IAAI,yBAAyB;IAC7C,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAY;IAC9C,MAAM,CAAC,QAAQ,CAAC,OAAO,WAAW;IAElC,wCAAwC;IACxC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAkB;IAC9C,qEAAqE;IACrE,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAS;IACvD,uCAAuC;IACvC,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAa;IAG3D,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE,MAAM,EAAE,CAAM;IAG/C,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,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Linux Server Plugin
4
+ *
5
+ * Handles Amazon Linux-specific package management and commands.
6
+ * Used for deploying to AWS EC2 instances running Amazon Linux 2023.
7
+ *
8
+ * ============================================================
9
+ * PLUGIN STRUCTURE STANDARD
10
+ * ============================================================
11
+ *
12
+ * This plugin follows a standardized structure for clarity and maintainability:
13
+ *
14
+ * **scanfix/** - Scan/fix operations organized by concern
15
+ * - Each file exports an array of Fix[] objects
16
+ * - All fixes are combined in the main plugin class
17
+ *
18
+ * **index.ts** - Main plugin class
19
+ * - Static metadata (id, name, category, version, os, packageManager, serviceManager)
20
+ * - shouldLoad() - Determines if plugin should load
21
+ * - OS-specific installation commands
22
+ * ============================================================
23
+ */
24
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ var desc = Object.getOwnPropertyDescriptor(m, k);
27
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
28
+ desc = { enumerable: true, get: function() { return m[k]; } };
29
+ }
30
+ Object.defineProperty(o, k2, desc);
31
+ }) : (function(o, m, k, k2) {
32
+ if (k2 === undefined) k2 = k;
33
+ o[k2] = m[k];
34
+ }));
35
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
36
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
37
+ }) : function(o, v) {
38
+ o["default"] = v;
39
+ });
40
+ var __importStar = (this && this.__importStar) || (function () {
41
+ var ownKeys = function(o) {
42
+ ownKeys = Object.getOwnPropertyNames || function (o) {
43
+ var ar = [];
44
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
45
+ return ar;
46
+ };
47
+ return ownKeys(o);
48
+ };
49
+ return function (mod) {
50
+ if (mod && mod.__esModule) return mod;
51
+ var result = {};
52
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
53
+ __setModuleDefault(result, mod);
54
+ return result;
55
+ };
56
+ })();
57
+ Object.defineProperty(exports, "__esModule", { value: true });
58
+ const child_process_1 = require("child_process");
59
+ // Import shared scanfix factories
60
+ const index_js_1 = require("../../../scanfix/index.js");
61
+ // Import SSH helper
62
+ const ssh_helper_js_1 = require("../../../utils/ssh-helper.js");
63
+ class AmazonLinuxPlugin {
64
+ // ============================================================
65
+ // STATIC METADATA
66
+ // ============================================================
67
+ static id = 'amazon-linux';
68
+ static name = 'Amazon Linux Server';
69
+ static category = 'server';
70
+ static version = '1.0.0';
71
+ /** The OS this server plugin handles */
72
+ static os = 'amazon-linux';
73
+ /** Package manager for Amazon Linux (dnf for AL2023, yum for AL2) */
74
+ static packageManager = 'dnf';
75
+ /** Service manager for Amazon Linux */
76
+ static serviceManager = 'systemd';
77
+ // Env vars this plugin requires
78
+ static requiredEnvVars = [];
79
+ // Schema for factiii.yml (user-editable)
80
+ static configSchema = {};
81
+ // Schema for factiiiAuto.yml (auto-detected)
82
+ static autoConfigSchema = {
83
+ ssh_user: 'string',
84
+ };
85
+ /**
86
+ * Determine if this plugin should be loaded for this project
87
+ * Loads if config has environment with server: 'amazon-linux'
88
+ */
89
+ static async shouldLoad(_rootDir, config) {
90
+ // Dynamic import to avoid circular dependencies
91
+ const { extractEnvironments } = await Promise.resolve().then(() => __importStar(require('../../../utils/config-helpers.js')));
92
+ const environments = extractEnvironments(config);
93
+ for (const env of Object.values(environments)) {
94
+ // Load if environment explicitly uses 'amazon-linux' server
95
+ if (env.server === 'amazon-linux') {
96
+ return true;
97
+ }
98
+ }
99
+ return false;
100
+ }
101
+ static helpText = {
102
+ SSH: `
103
+ SSH private key for accessing the Amazon Linux server.
104
+
105
+ For AWS EC2:
106
+ - Use the key pair you created when launching the instance
107
+ - Download the .pem file from AWS Console
108
+
109
+ Default user for Amazon Linux: ec2-user`,
110
+ };
111
+ // ============================================================
112
+ // FIXES - All issues this plugin can detect and resolve
113
+ // ============================================================
114
+ // All fixes are OS-specific to Amazon Linux
115
+ // ============================================================
116
+ static fixes = [
117
+ // Dev stage - shared fixes (with OS filter)
118
+ ...(0, index_js_1.getDockerFixes)('dev').map(fix => ({ ...fix, os: 'amazon-linux' })),
119
+ // Staging stage - shared fixes (with OS filter)
120
+ ...(0, index_js_1.getDockerFixes)('staging').map(fix => ({ ...fix, os: 'amazon-linux' })),
121
+ ...(0, index_js_1.getNodeFixes)('staging').map(fix => ({ ...fix, os: 'amazon-linux' })),
122
+ ...(0, index_js_1.getGitFixes)('staging').map(fix => ({ ...fix, os: 'amazon-linux' })),
123
+ ...(0, index_js_1.getPnpmFixes)('staging').map(fix => ({ ...fix, os: 'amazon-linux' })),
124
+ { ...(0, index_js_1.createCertbotFix)('staging', 'staging'), os: 'amazon-linux' },
125
+ // Prod stage - shared fixes (with OS filter)
126
+ ...(0, index_js_1.getDockerFixes)('prod').map(fix => ({ ...fix, os: 'amazon-linux' })),
127
+ ...(0, index_js_1.getNodeFixes)('prod').map(fix => ({ ...fix, os: 'amazon-linux' })),
128
+ ...(0, index_js_1.getGitFixes)('prod').map(fix => ({ ...fix, os: 'amazon-linux' })),
129
+ { ...(0, index_js_1.createCertbotFix)('prod', 'prod'), os: 'amazon-linux' },
130
+ ];
131
+ // ============================================================
132
+ // STATIC HELPER METHODS
133
+ // ============================================================
134
+ /**
135
+ * Auto-detect Amazon Linux configuration
136
+ */
137
+ static async detectConfig(_rootDir) {
138
+ return {
139
+ ssh_user: 'ec2-user', // Default SSH user for Amazon Linux
140
+ };
141
+ }
142
+ /**
143
+ * Execute a command on a remote server via SSH
144
+ */
145
+ static async sshExec(envConfig, command) {
146
+ return await (0, ssh_helper_js_1.sshExec)(envConfig, command);
147
+ }
148
+ // ============================================================
149
+ // AMAZON LINUX-SPECIFIC INSTALLATION COMMANDS
150
+ // ============================================================
151
+ /**
152
+ * Get the command to install Docker on Amazon Linux 2023
153
+ */
154
+ static getDockerInstallCommand() {
155
+ return `
156
+ sudo dnf update -y && \
157
+ sudo dnf install -y docker && \
158
+ sudo systemctl start docker && \
159
+ sudo systemctl enable docker && \
160
+ sudo usermod -aG docker $USER
161
+ `;
162
+ }
163
+ /**
164
+ * Get the command to install Node.js on Amazon Linux
165
+ */
166
+ static getNodeInstallCommand() {
167
+ return `
168
+ curl -fsSL https://rpm.nodesource.com/setup_20.x | sudo bash - && \
169
+ sudo dnf install -y nodejs
170
+ `;
171
+ }
172
+ /**
173
+ * Get the command to install git on Amazon Linux
174
+ */
175
+ static getGitInstallCommand() {
176
+ return 'sudo dnf install -y git';
177
+ }
178
+ // ============================================================
179
+ // INSTANCE METHODS
180
+ // ============================================================
181
+ _config;
182
+ constructor(config) {
183
+ this._config = config;
184
+ }
185
+ /**
186
+ * Ensure server is ready for deployment
187
+ */
188
+ async ensureServerReady(config, environment, options = {}) {
189
+ // Amazon Linux handles all environments that use it
190
+ return { success: true, message: 'Amazon Linux server ready' };
191
+ }
192
+ /**
193
+ * Deploy to an environment
194
+ */
195
+ async deploy(config, environment) {
196
+ // Deployment is handled by the pipeline plugin
197
+ // Server plugin just provides OS-specific commands
198
+ return { success: true, message: `Deployment for ${environment} handled by pipeline` };
199
+ }
200
+ /**
201
+ * Undeploy from an environment
202
+ */
203
+ async undeploy(config, environment) {
204
+ try {
205
+ (0, child_process_1.execSync)('docker compose down', { stdio: 'inherit' });
206
+ return { success: true, message: 'Containers stopped' };
207
+ }
208
+ catch (error) {
209
+ return {
210
+ success: false,
211
+ error: error instanceof Error ? error.message : String(error),
212
+ };
213
+ }
214
+ }
215
+ }
216
+ exports.default = AmazonLinuxPlugin;
217
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/plugins/servers/amazon-linux/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iDAAyC;AAWzC,kCAAkC;AAClC,wDAMmC;AAEnC,oBAAoB;AACpB,gEAAuD;A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M,CAAC,MAAqB,EAAE,WAAmB;QACrD,+CAA+C;QAC/C,mDAAmD;QACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,WAAW,sBAAsB,EAAE,CAAC;IACzF,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,QAAQ,CAAC,MAAqB,EAAE,WAAmB;QACvD,IAAI,CAAC;YACH,IAAA,wBAAQ,EAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;YACtD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC;QAC1D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;aAC9D,CAAC;QACJ,CAAC;IACH,CAAC;;AAGH,kBAAe,iBAAiB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Dev environment operations for macOS plugin
3
+ * Handles local development deployment
4
+ */
5
+ import type { DeployResult } from '../../../types/index.js';
6
+ /**
7
+ * Deploy to local dev environment
8
+ */
9
+ export declare function deployDev(): Promise<DeployResult>;
10
+ //# sourceMappingURL=dev.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../../src/plugins/servers/mac/dev.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D;;GAEG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,YAAY,CAAC,CAwBvD"}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ /**
3
+ * Dev environment operations for macOS plugin
4
+ * Handles local development deployment
5
+ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || (function () {
23
+ var ownKeys = function(o) {
24
+ ownKeys = Object.getOwnPropertyNames || function (o) {
25
+ var ar = [];
26
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
+ return ar;
28
+ };
29
+ return ownKeys(o);
30
+ };
31
+ return function (mod) {
32
+ if (mod && mod.__esModule) return mod;
33
+ var result = {};
34
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
+ __setModuleDefault(result, mod);
36
+ return result;
37
+ };
38
+ })();
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.deployDev = deployDev;
41
+ const fs = __importStar(require("fs"));
42
+ const child_process_1 = require("child_process");
43
+ /**
44
+ * Deploy to local dev environment
45
+ */
46
+ async function deployDev() {
47
+ console.log(' Starting local dev containers...');
48
+ try {
49
+ // Check for docker-compose file
50
+ const composeFile = fs.existsSync('docker-compose.yml')
51
+ ? 'docker-compose.yml'
52
+ : fs.existsSync('compose.yml')
53
+ ? 'compose.yml'
54
+ : null;
55
+ if (composeFile) {
56
+ (0, child_process_1.execSync)(`docker compose -f ${composeFile} up -d`, { stdio: 'inherit' });
57
+ return { success: true, message: 'Local containers started' };
58
+ }
59
+ else {
60
+ console.log(' No docker-compose.yml found, skipping container start');
61
+ return { success: true, message: 'No compose file, skipped' };
62
+ }
63
+ }
64
+ catch (error) {
65
+ return {
66
+ success: false,
67
+ error: error instanceof Error ? error.message : String(error),
68
+ };
69
+ }
70
+ }
71
+ //# sourceMappingURL=dev.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev.js","sourceRoot":"","sources":["../../../../src/plugins/servers/mac/dev.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASH,8BAwBC;AA/BD,uCAAyB;AACzB,iDAAyC;AAGzC;;GAEG;AACI,KAAK,UAAU,SAAS;IAC7B,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;IAEnD,IAAI,CAAC;QACH,gCAAgC;QAChC,MAAM,WAAW,GAAG,EAAE,CAAC,UAAU,CAAC,oBAAoB,CAAC;YACrD,CAAC,CAAC,oBAAoB;YACtB,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC;gBAC5B,CAAC,CAAC,aAAa;gBACf,CAAC,CAAC,IAAI,CAAC;QAEX,IAAI,WAAW,EAAE,CAAC;YAChB,IAAA,wBAAQ,EAAC,qBAAqB,WAAW,QAAQ,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;YACzE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,0BAA0B,EAAE,CAAC;QAChE,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,0DAA0D,CAAC,CAAC;YACxE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,0BAA0B,EAAE,CAAC;QAChE,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;SAC9D,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Mac Server Plugin
3
+ *
4
+ * Handles macOS-specific package management and commands.
5
+ * Used for deploying to Mac servers or local Mac development.
6
+ *
7
+ * ============================================================
8
+ * PLUGIN STRUCTURE STANDARD
9
+ * ============================================================
10
+ *
11
+ * This plugin follows a standardized structure for clarity and maintainability:
12
+ *
13
+ * **scanfix/** - Scan/fix operations organized by concern
14
+ * - Each file exports an array of Fix[] objects
15
+ * - Files group related fixes together (docker, node, git, containers, config)
16
+ * - All fixes are combined in the main plugin class
17
+ *
18
+ * **Environment-specific files** - Operations for each environment
19
+ * - dev.ts - Dev environment operations (deployDev)
20
+ * - staging.ts - Staging operations (deployStaging, ensureServerReady)
21
+ * - Only create files if they have content (no blank files)
22
+ *
23
+ * **index.ts** - Main plugin class
24
+ * - Static metadata (id, name, category, version, os, packageManager, serviceManager)
25
+ * - shouldLoad() - Determines if plugin should load
26
+ * - Imports and combines all scanfix arrays
27
+ * - Imports and uses environment-specific methods
28
+ * - Maintains public API compatibility
29
+ *
30
+ * **When each environment file is used:**
31
+ * - dev.ts: When deploying to local dev environment
32
+ * - staging.ts: When deploying to staging server or preparing staging server
33
+ *
34
+ * **How scanfix files are organized:**
35
+ * - docker.ts: Docker installation, running status, autostart (dev + staging)
36
+ * - node.ts: Node.js and pnpm installation (staging)
37
+ * - git.ts: Git installation (staging)
38
+ * - containers.ts: Container management and cleanup (staging)
39
+ * - config.ts: Configuration checks and file validation (dev + staging)
40
+ * ============================================================
41
+ */
42
+ import type { FactiiiConfig, EnvironmentConfig, DeployResult, EnsureServerReadyOptions, ServerOS, PackageManager, ServiceManager } from '../../../types/index.js';
43
+ declare class MacPlugin {
44
+ static readonly id = "mac";
45
+ static readonly name = "Mac Server";
46
+ static readonly category: 'server';
47
+ static readonly version = "1.0.0";
48
+ /** The OS this server plugin handles */
49
+ static readonly os: ServerOS;
50
+ /** Package manager for macOS */
51
+ static readonly packageManager: PackageManager;
52
+ /** Service manager for macOS */
53
+ static readonly serviceManager: ServiceManager;
54
+ static readonly requiredEnvVars: string[];
55
+ static readonly configSchema: Record<string, unknown>;
56
+ static readonly autoConfigSchema: Record<string, string>;
57
+ /**
58
+ * Determine if this plugin should be loaded for this project
59
+ * Loads if config has environment with server: 'mac'
60
+ */
61
+ static shouldLoad(_rootDir: string, config: FactiiiConfig): Promise<boolean>;
62
+ static helpText: Record<string, string>;
63
+ static readonly fixes: {
64
+ os: ServerOS;
65
+ id: string;
66
+ stage: import("../../../types/plugin.js").Stage;
67
+ severity: import("../../../types/plugin.js").Severity;
68
+ description: string;
69
+ plugin?: string;
70
+ scan: (config: FactiiiConfig, rootDir: string) => Promise<boolean>;
71
+ fix?: ((config: FactiiiConfig, rootDir: string) => Promise<boolean>) | null;
72
+ manualFix: string;
73
+ }[];
74
+ /**
75
+ * Auto-detect macOS configuration
76
+ */
77
+ static detectConfig(_rootDir: string): Promise<{
78
+ ssh_user: string;
79
+ }>;
80
+ /**
81
+ * Execute a command on a remote server via SSH
82
+ */
83
+ static sshExec(envConfig: EnvironmentConfig, command: string): Promise<string>;
84
+ private _config;
85
+ constructor(config: FactiiiConfig);
86
+ /**
87
+ * Ensure server is ready for deployment
88
+ * Installs Node.js, git, pnpm, clones repo, checks out commit
89
+ */
90
+ ensureServerReady(config: FactiiiConfig, environment: string, options?: EnsureServerReadyOptions): Promise<DeployResult>;
91
+ /**
92
+ * Deploy to an environment
93
+ */
94
+ deploy(config: FactiiiConfig, environment: string): Promise<DeployResult>;
95
+ /**
96
+ * Undeploy from an environment
97
+ */
98
+ undeploy(config: FactiiiConfig, environment: string): Promise<DeployResult>;
99
+ }
100
+ export default MacPlugin;
101
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/servers/mac/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;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