@build-astron-co/nimbus 0.4.1 → 0.4.3

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 (435) hide show
  1. package/CHANGELOG.md +268 -89
  2. package/README.md +26 -567
  3. package/dist/src/agent/compaction-agent.js +24 -12
  4. package/dist/src/agent/context-manager.js +2 -1
  5. package/dist/src/agent/expand-files.js +2 -1
  6. package/dist/src/agent/loop.js +71 -33
  7. package/dist/src/agent/permissions.js +4 -2
  8. package/dist/src/agent/system-prompt.js +34 -17
  9. package/dist/src/app.js +1 -1
  10. package/dist/src/auth/keychain.js +8 -4
  11. package/dist/src/auth/store.js +70 -107
  12. package/dist/src/cli/init.js +35 -19
  13. package/dist/src/cli/run.js +18 -10
  14. package/dist/src/cli/serve.js +4 -2
  15. package/dist/src/cli.js +52 -11
  16. package/dist/src/commands/alias.js +5 -3
  17. package/dist/src/commands/audit/index.js +2 -1
  18. package/dist/src/commands/aws-terraform.js +36 -18
  19. package/dist/src/commands/completions.js +1 -1
  20. package/dist/src/commands/config.js +3 -2
  21. package/dist/src/commands/connect-github.js +92 -0
  22. package/dist/src/commands/cost/index.js +3 -2
  23. package/dist/src/commands/deploy.js +15 -10
  24. package/dist/src/commands/doctor.js +9 -6
  25. package/dist/src/commands/drift/index.js +2 -1
  26. package/dist/src/commands/export.js +5 -3
  27. package/dist/src/commands/generate-terraform.js +110 -2
  28. package/dist/src/commands/import.js +3 -3
  29. package/dist/src/commands/incident.js +10 -5
  30. package/dist/src/commands/login.js +8 -93
  31. package/dist/src/commands/logs.js +16 -8
  32. package/dist/src/commands/onboarding.js +6 -4
  33. package/dist/src/commands/pipeline.js +6 -3
  34. package/dist/src/commands/plugin.js +3 -2
  35. package/dist/src/commands/profile.js +27 -14
  36. package/dist/src/commands/questionnaire.js +1 -1
  37. package/dist/src/commands/rollback.js +3 -2
  38. package/dist/src/commands/rollout.js +5 -3
  39. package/dist/src/commands/runbook.js +17 -10
  40. package/dist/src/commands/schedule.js +10 -5
  41. package/dist/src/commands/status.js +2 -1
  42. package/dist/src/commands/team-context.js +12 -7
  43. package/dist/src/commands/template.js +1 -1
  44. package/dist/src/commands/tf/index.js +6 -3
  45. package/dist/src/commands/upgrade.js +5 -3
  46. package/dist/src/commands/version.js +6 -3
  47. package/dist/src/commands/watch.js +6 -3
  48. package/dist/src/compat/sqlite.js +5 -3
  49. package/dist/src/config/mode-store.js +2 -1
  50. package/dist/src/config/profiles.js +4 -2
  51. package/dist/src/config/types.js +2 -1
  52. package/dist/src/engine/executor.js +8 -4
  53. package/dist/src/engine/planner.js +9 -5
  54. package/dist/src/llm/providers/anthropic.js +6 -3
  55. package/dist/src/llm/providers/ollama.js +1 -1
  56. package/dist/src/llm/router.js +22 -7
  57. package/dist/src/nimbus.js +1 -0
  58. package/dist/src/sessions/manager.js +6 -3
  59. package/dist/src/sharing/viewer.js +2 -1
  60. package/dist/src/tools/file-ops.js +1 -2
  61. package/dist/src/tools/schemas/devops.js +197 -108
  62. package/dist/src/tools/schemas/standard.js +1 -1
  63. package/dist/src/ui/App.js +25 -13
  64. package/dist/src/ui/FileDiffModal.js +22 -11
  65. package/dist/src/ui/HelpModal.js +2 -1
  66. package/dist/src/ui/InputBox.js +6 -3
  67. package/dist/src/ui/MessageList.js +40 -20
  68. package/dist/src/ui/TerminalPane.js +2 -1
  69. package/dist/src/ui/ToolCallDisplay.js +12 -6
  70. package/dist/src/ui/TreePane.js +2 -1
  71. package/dist/src/ui/ink/index.js +37 -21
  72. package/dist/src/version.js +1 -1
  73. package/dist/src/watcher/index.js +8 -4
  74. package/package.json +3 -5
  75. package/src/__tests__/alias.test.ts +0 -133
  76. package/src/__tests__/app.test.ts +0 -76
  77. package/src/__tests__/audit.test.ts +0 -877
  78. package/src/__tests__/circuit-breaker.test.ts +0 -116
  79. package/src/__tests__/cli-run.test.ts +0 -351
  80. package/src/__tests__/compat-sqlite.test.ts +0 -68
  81. package/src/__tests__/context-manager.test.ts +0 -632
  82. package/src/__tests__/context.test.ts +0 -242
  83. package/src/__tests__/devops-terminal-gaps.test.ts +0 -718
  84. package/src/__tests__/doctor.test.ts +0 -48
  85. package/src/__tests__/enterprise.test.ts +0 -401
  86. package/src/__tests__/export.test.ts +0 -236
  87. package/src/__tests__/gap-11-18-20.test.ts +0 -958
  88. package/src/__tests__/generator.test.ts +0 -433
  89. package/src/__tests__/helm-streaming.test.ts +0 -127
  90. package/src/__tests__/hooks.test.ts +0 -582
  91. package/src/__tests__/incident.test.ts +0 -179
  92. package/src/__tests__/init.test.ts +0 -487
  93. package/src/__tests__/intent-parser.test.ts +0 -229
  94. package/src/__tests__/llm-router.test.ts +0 -209
  95. package/src/__tests__/logs.test.ts +0 -107
  96. package/src/__tests__/loop-errors.test.ts +0 -244
  97. package/src/__tests__/lsp.test.ts +0 -293
  98. package/src/__tests__/modes.test.ts +0 -336
  99. package/src/__tests__/perf-optimizations.test.ts +0 -847
  100. package/src/__tests__/permissions.test.ts +0 -338
  101. package/src/__tests__/pipeline.test.ts +0 -50
  102. package/src/__tests__/polish-phase3.test.ts +0 -340
  103. package/src/__tests__/profile.test.ts +0 -237
  104. package/src/__tests__/rollback.test.ts +0 -83
  105. package/src/__tests__/runbook.test.ts +0 -219
  106. package/src/__tests__/schedule.test.ts +0 -206
  107. package/src/__tests__/serve.test.ts +0 -275
  108. package/src/__tests__/sessions.test.ts +0 -322
  109. package/src/__tests__/sharing.test.ts +0 -340
  110. package/src/__tests__/snapshots.test.ts +0 -581
  111. package/src/__tests__/standalone-migration.test.ts +0 -199
  112. package/src/__tests__/state-db.test.ts +0 -334
  113. package/src/__tests__/status.test.ts +0 -158
  114. package/src/__tests__/stream-with-tools.test.ts +0 -778
  115. package/src/__tests__/subagents.test.ts +0 -176
  116. package/src/__tests__/system-prompt.test.ts +0 -248
  117. package/src/__tests__/terminal-gap-v2.test.ts +0 -395
  118. package/src/__tests__/terminal-parity.test.ts +0 -393
  119. package/src/__tests__/tf-apply.test.ts +0 -187
  120. package/src/__tests__/tool-converter.test.ts +0 -256
  121. package/src/__tests__/tool-schemas.test.ts +0 -602
  122. package/src/__tests__/tools.test.ts +0 -144
  123. package/src/__tests__/version-json.test.ts +0 -184
  124. package/src/__tests__/version.test.ts +0 -49
  125. package/src/__tests__/watch.test.ts +0 -129
  126. package/src/agent/compaction-agent.ts +0 -266
  127. package/src/agent/context-manager.ts +0 -499
  128. package/src/agent/context.ts +0 -427
  129. package/src/agent/deploy-preview.ts +0 -487
  130. package/src/agent/expand-files.ts +0 -108
  131. package/src/agent/index.ts +0 -68
  132. package/src/agent/loop.ts +0 -1998
  133. package/src/agent/modes.ts +0 -429
  134. package/src/agent/permissions.ts +0 -513
  135. package/src/agent/subagents/base.ts +0 -116
  136. package/src/agent/subagents/cost.ts +0 -51
  137. package/src/agent/subagents/explore.ts +0 -42
  138. package/src/agent/subagents/general.ts +0 -54
  139. package/src/agent/subagents/index.ts +0 -102
  140. package/src/agent/subagents/infra.ts +0 -59
  141. package/src/agent/subagents/security.ts +0 -69
  142. package/src/agent/system-prompt.ts +0 -990
  143. package/src/app.ts +0 -180
  144. package/src/audit/activity-log.ts +0 -290
  145. package/src/audit/compliance-checker.ts +0 -540
  146. package/src/audit/cost-tracker.ts +0 -318
  147. package/src/audit/index.ts +0 -23
  148. package/src/audit/security-scanner.ts +0 -641
  149. package/src/auth/guard.ts +0 -75
  150. package/src/auth/index.ts +0 -56
  151. package/src/auth/keychain.ts +0 -82
  152. package/src/auth/oauth.ts +0 -465
  153. package/src/auth/providers.ts +0 -470
  154. package/src/auth/sso.ts +0 -113
  155. package/src/auth/store.ts +0 -505
  156. package/src/auth/types.ts +0 -187
  157. package/src/build.ts +0 -141
  158. package/src/cli/index.ts +0 -16
  159. package/src/cli/init.ts +0 -1227
  160. package/src/cli/openapi-spec.ts +0 -356
  161. package/src/cli/run.ts +0 -628
  162. package/src/cli/serve-auth.ts +0 -80
  163. package/src/cli/serve.ts +0 -539
  164. package/src/cli/web.ts +0 -71
  165. package/src/cli.ts +0 -1728
  166. package/src/clients/core-engine-client.ts +0 -227
  167. package/src/clients/enterprise-client.ts +0 -334
  168. package/src/clients/generator-client.ts +0 -351
  169. package/src/clients/git-client.ts +0 -627
  170. package/src/clients/github-client.ts +0 -410
  171. package/src/clients/helm-client.ts +0 -504
  172. package/src/clients/index.ts +0 -80
  173. package/src/clients/k8s-client.ts +0 -497
  174. package/src/clients/llm-client.ts +0 -161
  175. package/src/clients/rest-client.ts +0 -130
  176. package/src/clients/service-discovery.ts +0 -38
  177. package/src/clients/terraform-client.ts +0 -482
  178. package/src/clients/tools-client.ts +0 -1843
  179. package/src/clients/ws-client.ts +0 -115
  180. package/src/commands/alias.ts +0 -100
  181. package/src/commands/analyze/index.ts +0 -352
  182. package/src/commands/apply/helm.ts +0 -473
  183. package/src/commands/apply/index.ts +0 -213
  184. package/src/commands/apply/k8s.ts +0 -454
  185. package/src/commands/apply/terraform.ts +0 -582
  186. package/src/commands/ask.ts +0 -167
  187. package/src/commands/audit/index.ts +0 -357
  188. package/src/commands/auth-cloud.ts +0 -407
  189. package/src/commands/auth-list.ts +0 -134
  190. package/src/commands/auth-profile.ts +0 -121
  191. package/src/commands/auth-refresh.ts +0 -187
  192. package/src/commands/auth-status.ts +0 -141
  193. package/src/commands/aws/ec2.ts +0 -501
  194. package/src/commands/aws/iam.ts +0 -397
  195. package/src/commands/aws/index.ts +0 -133
  196. package/src/commands/aws/lambda.ts +0 -396
  197. package/src/commands/aws/rds.ts +0 -439
  198. package/src/commands/aws/s3.ts +0 -439
  199. package/src/commands/aws/vpc.ts +0 -393
  200. package/src/commands/aws-discover.ts +0 -542
  201. package/src/commands/aws-terraform.ts +0 -755
  202. package/src/commands/azure/aks.ts +0 -376
  203. package/src/commands/azure/functions.ts +0 -253
  204. package/src/commands/azure/index.ts +0 -116
  205. package/src/commands/azure/storage.ts +0 -478
  206. package/src/commands/azure/vm.ts +0 -355
  207. package/src/commands/billing/index.ts +0 -256
  208. package/src/commands/chat.ts +0 -320
  209. package/src/commands/completions.ts +0 -268
  210. package/src/commands/config.ts +0 -372
  211. package/src/commands/cost/cloud-cost-estimator.ts +0 -266
  212. package/src/commands/cost/estimator.ts +0 -79
  213. package/src/commands/cost/index.ts +0 -810
  214. package/src/commands/cost/parsers/terraform.ts +0 -273
  215. package/src/commands/cost/parsers/types.ts +0 -25
  216. package/src/commands/cost/pricing/aws.ts +0 -544
  217. package/src/commands/cost/pricing/azure.ts +0 -499
  218. package/src/commands/cost/pricing/gcp.ts +0 -396
  219. package/src/commands/cost/pricing/index.ts +0 -40
  220. package/src/commands/demo.ts +0 -250
  221. package/src/commands/deploy.ts +0 -260
  222. package/src/commands/doctor.ts +0 -1386
  223. package/src/commands/drift/index.ts +0 -787
  224. package/src/commands/explain.ts +0 -277
  225. package/src/commands/export.ts +0 -146
  226. package/src/commands/feedback.ts +0 -389
  227. package/src/commands/fix.ts +0 -324
  228. package/src/commands/fs/index.ts +0 -402
  229. package/src/commands/gcp/compute.ts +0 -325
  230. package/src/commands/gcp/functions.ts +0 -271
  231. package/src/commands/gcp/gke.ts +0 -438
  232. package/src/commands/gcp/iam.ts +0 -344
  233. package/src/commands/gcp/index.ts +0 -129
  234. package/src/commands/gcp/storage.ts +0 -284
  235. package/src/commands/generate-helm.ts +0 -1249
  236. package/src/commands/generate-k8s.ts +0 -1508
  237. package/src/commands/generate-terraform.ts +0 -1202
  238. package/src/commands/gh/index.ts +0 -863
  239. package/src/commands/git/index.ts +0 -1343
  240. package/src/commands/helm/index.ts +0 -1126
  241. package/src/commands/help.ts +0 -715
  242. package/src/commands/history.ts +0 -149
  243. package/src/commands/import.ts +0 -868
  244. package/src/commands/incident.ts +0 -166
  245. package/src/commands/index.ts +0 -367
  246. package/src/commands/init.ts +0 -1051
  247. package/src/commands/k8s/index.ts +0 -1137
  248. package/src/commands/login.ts +0 -716
  249. package/src/commands/logout.ts +0 -83
  250. package/src/commands/logs.ts +0 -167
  251. package/src/commands/onboarding.ts +0 -405
  252. package/src/commands/pipeline.ts +0 -186
  253. package/src/commands/plan/display.ts +0 -279
  254. package/src/commands/plan/index.ts +0 -599
  255. package/src/commands/plugin.ts +0 -398
  256. package/src/commands/preview.ts +0 -452
  257. package/src/commands/profile.ts +0 -342
  258. package/src/commands/questionnaire.ts +0 -1172
  259. package/src/commands/resume.ts +0 -47
  260. package/src/commands/rollback.ts +0 -315
  261. package/src/commands/rollout.ts +0 -88
  262. package/src/commands/runbook.ts +0 -346
  263. package/src/commands/schedule.ts +0 -236
  264. package/src/commands/status.ts +0 -252
  265. package/src/commands/team/index.ts +0 -346
  266. package/src/commands/team-context.ts +0 -220
  267. package/src/commands/template.ts +0 -233
  268. package/src/commands/tf/index.ts +0 -1093
  269. package/src/commands/upgrade.ts +0 -607
  270. package/src/commands/usage/index.ts +0 -134
  271. package/src/commands/version.ts +0 -174
  272. package/src/commands/watch.ts +0 -153
  273. package/src/compat/index.ts +0 -2
  274. package/src/compat/runtime.ts +0 -12
  275. package/src/compat/sqlite.ts +0 -177
  276. package/src/config/index.ts +0 -17
  277. package/src/config/manager.ts +0 -530
  278. package/src/config/mode-store.ts +0 -62
  279. package/src/config/profiles.ts +0 -84
  280. package/src/config/safety-policy.ts +0 -358
  281. package/src/config/schema.ts +0 -125
  282. package/src/config/types.ts +0 -609
  283. package/src/config/workspace-state.ts +0 -53
  284. package/src/context/context-db.ts +0 -199
  285. package/src/demo/index.ts +0 -349
  286. package/src/demo/scenarios/full-journey.ts +0 -229
  287. package/src/demo/scenarios/getting-started.ts +0 -127
  288. package/src/demo/scenarios/helm-release.ts +0 -341
  289. package/src/demo/scenarios/k8s-deployment.ts +0 -194
  290. package/src/demo/scenarios/terraform-vpc.ts +0 -170
  291. package/src/demo/types.ts +0 -92
  292. package/src/engine/cost-estimator.ts +0 -480
  293. package/src/engine/diagram-generator.ts +0 -256
  294. package/src/engine/drift-detector.ts +0 -902
  295. package/src/engine/executor.ts +0 -1066
  296. package/src/engine/index.ts +0 -76
  297. package/src/engine/orchestrator.ts +0 -636
  298. package/src/engine/planner.ts +0 -787
  299. package/src/engine/safety.ts +0 -743
  300. package/src/engine/verifier.ts +0 -770
  301. package/src/enterprise/audit.ts +0 -348
  302. package/src/enterprise/auth.ts +0 -270
  303. package/src/enterprise/billing.ts +0 -822
  304. package/src/enterprise/index.ts +0 -17
  305. package/src/enterprise/teams.ts +0 -443
  306. package/src/generator/best-practices.ts +0 -1608
  307. package/src/generator/helm.ts +0 -630
  308. package/src/generator/index.ts +0 -37
  309. package/src/generator/intent-parser.ts +0 -514
  310. package/src/generator/kubernetes.ts +0 -976
  311. package/src/generator/terraform.ts +0 -1875
  312. package/src/history/index.ts +0 -8
  313. package/src/history/manager.ts +0 -250
  314. package/src/history/types.ts +0 -34
  315. package/src/hooks/config.ts +0 -432
  316. package/src/hooks/engine.ts +0 -392
  317. package/src/hooks/index.ts +0 -4
  318. package/src/llm/auth-bridge.ts +0 -198
  319. package/src/llm/circuit-breaker.ts +0 -140
  320. package/src/llm/config-loader.ts +0 -201
  321. package/src/llm/cost-calculator.ts +0 -171
  322. package/src/llm/index.ts +0 -8
  323. package/src/llm/model-aliases.ts +0 -115
  324. package/src/llm/provider-registry.ts +0 -63
  325. package/src/llm/providers/anthropic.ts +0 -462
  326. package/src/llm/providers/bedrock.ts +0 -477
  327. package/src/llm/providers/google.ts +0 -405
  328. package/src/llm/providers/ollama.ts +0 -767
  329. package/src/llm/providers/openai-compatible.ts +0 -340
  330. package/src/llm/providers/openai.ts +0 -328
  331. package/src/llm/providers/openrouter.ts +0 -338
  332. package/src/llm/router.ts +0 -1104
  333. package/src/llm/types.ts +0 -232
  334. package/src/lsp/client.ts +0 -298
  335. package/src/lsp/languages.ts +0 -119
  336. package/src/lsp/manager.ts +0 -294
  337. package/src/mcp/client.ts +0 -402
  338. package/src/mcp/index.ts +0 -5
  339. package/src/mcp/manager.ts +0 -133
  340. package/src/nimbus.ts +0 -233
  341. package/src/plugins/index.ts +0 -27
  342. package/src/plugins/loader.ts +0 -334
  343. package/src/plugins/manager.ts +0 -376
  344. package/src/plugins/types.ts +0 -284
  345. package/src/scanners/cicd-scanner.ts +0 -258
  346. package/src/scanners/cloud-scanner.ts +0 -466
  347. package/src/scanners/framework-scanner.ts +0 -469
  348. package/src/scanners/iac-scanner.ts +0 -388
  349. package/src/scanners/index.ts +0 -539
  350. package/src/scanners/language-scanner.ts +0 -276
  351. package/src/scanners/package-manager-scanner.ts +0 -277
  352. package/src/scanners/types.ts +0 -172
  353. package/src/sessions/manager.ts +0 -472
  354. package/src/sessions/types.ts +0 -44
  355. package/src/sharing/sync.ts +0 -300
  356. package/src/sharing/viewer.ts +0 -163
  357. package/src/snapshots/index.ts +0 -2
  358. package/src/snapshots/manager.ts +0 -530
  359. package/src/state/artifacts.ts +0 -147
  360. package/src/state/audit.ts +0 -137
  361. package/src/state/billing.ts +0 -240
  362. package/src/state/checkpoints.ts +0 -117
  363. package/src/state/config.ts +0 -67
  364. package/src/state/conversations.ts +0 -14
  365. package/src/state/credentials.ts +0 -154
  366. package/src/state/db.ts +0 -58
  367. package/src/state/index.ts +0 -26
  368. package/src/state/messages.ts +0 -115
  369. package/src/state/projects.ts +0 -123
  370. package/src/state/schema.ts +0 -236
  371. package/src/state/sessions.ts +0 -147
  372. package/src/state/teams.ts +0 -200
  373. package/src/telemetry.ts +0 -108
  374. package/src/tools/aws-ops.ts +0 -952
  375. package/src/tools/azure-ops.ts +0 -579
  376. package/src/tools/file-ops.ts +0 -615
  377. package/src/tools/gcp-ops.ts +0 -625
  378. package/src/tools/git-ops.ts +0 -773
  379. package/src/tools/github-ops.ts +0 -799
  380. package/src/tools/helm-ops.ts +0 -943
  381. package/src/tools/index.ts +0 -17
  382. package/src/tools/k8s-ops.ts +0 -819
  383. package/src/tools/schemas/converter.ts +0 -184
  384. package/src/tools/schemas/devops.ts +0 -3502
  385. package/src/tools/schemas/index.ts +0 -73
  386. package/src/tools/schemas/standard.ts +0 -1148
  387. package/src/tools/schemas/types.ts +0 -735
  388. package/src/tools/spawn-exec.ts +0 -148
  389. package/src/tools/terraform-ops.ts +0 -862
  390. package/src/types/ambient.d.ts +0 -193
  391. package/src/types/config.ts +0 -83
  392. package/src/types/drift.ts +0 -116
  393. package/src/types/enterprise.ts +0 -335
  394. package/src/types/index.ts +0 -20
  395. package/src/types/plan.ts +0 -44
  396. package/src/types/request.ts +0 -65
  397. package/src/types/response.ts +0 -54
  398. package/src/types/service.ts +0 -51
  399. package/src/ui/App.tsx +0 -2114
  400. package/src/ui/DeployPreview.tsx +0 -174
  401. package/src/ui/FileDiffModal.tsx +0 -162
  402. package/src/ui/Header.tsx +0 -131
  403. package/src/ui/HelpModal.tsx +0 -57
  404. package/src/ui/InputBox.tsx +0 -503
  405. package/src/ui/MessageList.tsx +0 -1032
  406. package/src/ui/PermissionPrompt.tsx +0 -163
  407. package/src/ui/StatusBar.tsx +0 -277
  408. package/src/ui/TerminalPane.tsx +0 -84
  409. package/src/ui/ToolCallDisplay.tsx +0 -643
  410. package/src/ui/TreePane.tsx +0 -132
  411. package/src/ui/chat-ui.ts +0 -850
  412. package/src/ui/index.ts +0 -33
  413. package/src/ui/ink/index.ts +0 -1444
  414. package/src/ui/streaming.ts +0 -176
  415. package/src/ui/theme.ts +0 -104
  416. package/src/ui/types.ts +0 -75
  417. package/src/utils/analytics.ts +0 -72
  418. package/src/utils/cost-warning.ts +0 -27
  419. package/src/utils/env.ts +0 -46
  420. package/src/utils/errors.ts +0 -69
  421. package/src/utils/event-bus.ts +0 -38
  422. package/src/utils/index.ts +0 -24
  423. package/src/utils/logger.ts +0 -171
  424. package/src/utils/rate-limiter.ts +0 -121
  425. package/src/utils/service-auth.ts +0 -49
  426. package/src/utils/validation.ts +0 -53
  427. package/src/version.ts +0 -4
  428. package/src/watcher/index.ts +0 -214
  429. package/src/wizard/approval.ts +0 -383
  430. package/src/wizard/index.ts +0 -25
  431. package/src/wizard/prompts.ts +0 -338
  432. package/src/wizard/types.ts +0 -172
  433. package/src/wizard/ui.ts +0 -556
  434. package/src/wizard/wizard.ts +0 -304
  435. package/tsconfig.json +0 -24
@@ -1,755 +0,0 @@
1
- /**
2
- * AWS Terraform Command
3
- *
4
- * Generate Terraform configurations from AWS infrastructure
5
- *
6
- * Usage: nimbus aws terraform [options]
7
- */
8
-
9
- import { logger } from '../utils';
10
- import {
11
- createWizard,
12
- ui,
13
- select,
14
- confirm,
15
- pathInput,
16
- type WizardStep,
17
- type StepResult,
18
- } from '../wizard';
19
- import { awsDiscoverCommand, type AwsDiscoverOptions } from './aws-discover';
20
- import { generateTerraformProject } from '../generator/terraform';
21
- import { readFile, writeFile } from 'node:fs/promises';
22
- import * as path from 'path';
23
- import * as fs from 'fs';
24
-
25
- /**
26
- * Terraform generation context
27
- */
28
- export interface AwsTerraformContext {
29
- // Discovery input
30
- discoverySessionId?: string;
31
- resources?: DiscoveredResource[];
32
-
33
- // Generation options
34
- outputPath?: string;
35
- organizeByService?: boolean;
36
- generateImportBlocks?: boolean;
37
- generateImportScript?: boolean;
38
- terraformVersion?: string;
39
- awsProviderVersion?: string;
40
-
41
- // Starter kit options
42
- includeReadme?: boolean;
43
- includeGitignore?: boolean;
44
- includeMakefile?: boolean;
45
-
46
- // Output
47
- terraformSessionId?: string;
48
- generatedFiles?: Record<string, string>;
49
- summary?: GenerationSummary;
50
- }
51
-
52
- /**
53
- * Discovered resource
54
- */
55
- interface DiscoveredResource {
56
- id: string;
57
- type: string;
58
- region: string;
59
- name?: string;
60
- tags?: Record<string, string>;
61
- properties: Record<string, unknown>;
62
- }
63
-
64
- /**
65
- * Generation summary
66
- */
67
- interface GenerationSummary {
68
- totalResources: number;
69
- mappedResources: number;
70
- unmappedResources: number;
71
- filesGenerated: number;
72
- servicesIncluded: string[];
73
- regionsIncluded: string[];
74
- }
75
-
76
- /**
77
- * Command options from CLI arguments
78
- */
79
- export interface AwsTerraformOptions {
80
- // Discovery options (for full flow)
81
- profile?: string;
82
- regions?: string[];
83
- services?: string[];
84
-
85
- // Direct generation options
86
- sessionId?: string; // Use existing discovery session
87
- resourcesFile?: string; // Load resources from JSON file
88
-
89
- // Generation options
90
- output?: string;
91
- organizeByService?: boolean;
92
- importBlocks?: boolean;
93
- importScript?: boolean;
94
- terraformVersion?: string;
95
- awsProviderVersion?: string;
96
-
97
- // Starter kit
98
- includeStarterKit?: boolean;
99
- includeReadme?: boolean;
100
- includeGitignore?: boolean;
101
- includeMakefile?: boolean;
102
-
103
- // Mode
104
- nonInteractive?: boolean;
105
- skipDiscovery?: boolean;
106
- }
107
-
108
- /**
109
- * Run the AWS terraform command
110
- */
111
- export async function awsTerraformCommand(options: AwsTerraformOptions = {}): Promise<void> {
112
- logger.info('Starting AWS Terraform generation');
113
-
114
- // Non-interactive mode
115
- if (options.nonInteractive) {
116
- await runNonInteractive(options);
117
- return;
118
- }
119
-
120
- // Check if we have resources to generate from
121
- let resources: DiscoveredResource[] | undefined;
122
- let discoverySessionId: string | undefined;
123
-
124
- // Option 1: Use existing discovery session
125
- if (options.sessionId) {
126
- discoverySessionId = options.sessionId;
127
- ui.info(`Using existing discovery session: ${options.sessionId}`);
128
- }
129
- // Option 2: Load resources from file
130
- else if (options.resourcesFile) {
131
- ui.startSpinner({ message: 'Loading resources from file...' });
132
- try {
133
- const fileContent = await readFile(options.resourcesFile, 'utf-8');
134
- const data = JSON.parse(fileContent);
135
- resources = data.resources || data;
136
- ui.stopSpinnerSuccess(`Loaded ${resources!.length} resources from file`);
137
- } catch (error: any) {
138
- ui.stopSpinnerFail(`Failed to load resources: ${error.message}`);
139
- return;
140
- }
141
- }
142
- // Option 3: Run discovery first
143
- else if (!options.skipDiscovery) {
144
- const discoveryOptions: AwsDiscoverOptions = {
145
- profile: options.profile,
146
- regions: options.regions,
147
- services: options.services,
148
- nonInteractive: false,
149
- };
150
-
151
- ui.header('nimbus aws terraform', 'Step 1: Infrastructure Discovery');
152
- ui.newLine();
153
-
154
- const inventory = await awsDiscoverCommand(discoveryOptions);
155
- if (!inventory) {
156
- ui.error('Discovery failed, cannot generate Terraform');
157
- return;
158
- }
159
-
160
- resources = inventory.resources;
161
- ui.newLine();
162
- ui.header('nimbus aws terraform', 'Step 2: Terraform Generation');
163
- ui.newLine();
164
- }
165
-
166
- // Interactive wizard for generation options
167
- const wizard = createWizard<AwsTerraformContext>({
168
- title: 'Terraform Generation',
169
- description: 'Configure Terraform generation options',
170
- initialContext: {
171
- discoverySessionId,
172
- resources,
173
- outputPath: options.output,
174
- organizeByService: options.organizeByService ?? true,
175
- generateImportBlocks: options.importBlocks ?? true,
176
- generateImportScript: options.importScript ?? true,
177
- terraformVersion: options.terraformVersion,
178
- awsProviderVersion: options.awsProviderVersion,
179
- includeReadme: options.includeReadme ?? options.includeStarterKit,
180
- includeGitignore: options.includeGitignore ?? options.includeStarterKit,
181
- includeMakefile: options.includeMakefile ?? options.includeStarterKit,
182
- },
183
- steps: createWizardSteps(!!discoverySessionId || !!resources),
184
- onEvent: event => {
185
- logger.debug('Wizard event', { type: event.type });
186
- },
187
- });
188
-
189
- const result = await wizard.run();
190
-
191
- if (result.success) {
192
- displayCompletionMessage(result.context);
193
- } else {
194
- ui.error(`Generation failed: ${result.error?.message || 'Unknown error'}`);
195
- process.exit(1);
196
- }
197
- }
198
-
199
- /**
200
- * Create wizard steps
201
- */
202
- function createWizardSteps(_hasResources: boolean): WizardStep<AwsTerraformContext>[] {
203
- const steps: WizardStep<AwsTerraformContext>[] = [];
204
-
205
- // Step 1: Generation Options
206
- steps.push({
207
- id: 'generation-options',
208
- title: 'Generation Options',
209
- description: 'Configure how Terraform files should be generated',
210
- execute: generationOptionsStep,
211
- });
212
-
213
- // Step 2: Output Location
214
- steps.push({
215
- id: 'output-location',
216
- title: 'Output Location',
217
- description: 'Where should the Terraform files be saved?',
218
- execute: outputLocationStep,
219
- });
220
-
221
- // Step 3: Generate
222
- steps.push({
223
- id: 'generate',
224
- title: 'Generate Terraform',
225
- description: 'Generating Terraform configurations...',
226
- execute: generateStep,
227
- });
228
-
229
- // Step 4: Write Files
230
- steps.push({
231
- id: 'write-files',
232
- title: 'Write Files',
233
- description: 'Writing files to disk...',
234
- execute: writeFilesStep,
235
- });
236
-
237
- return steps;
238
- }
239
-
240
- /**
241
- * Step 1: Generation Options
242
- */
243
- async function generationOptionsStep(ctx: AwsTerraformContext): Promise<StepResult> {
244
- // Organization style
245
- const organizeChoice = await select<'service' | 'single'>({
246
- message: 'How should Terraform files be organized?',
247
- options: [
248
- {
249
- value: 'service',
250
- label: 'By service (Recommended)',
251
- description: 'Separate files for each AWS service (ec2.tf, s3.tf, etc.)',
252
- },
253
- {
254
- value: 'single',
255
- label: 'Single file',
256
- description: 'All resources in main.tf',
257
- },
258
- ],
259
- defaultValue: ctx.organizeByService !== false ? 'service' : 'single',
260
- });
261
-
262
- // Import method
263
- ui.newLine();
264
- const importMethod = await select<'both' | 'blocks' | 'script' | 'none'>({
265
- message: 'How should imports be generated?',
266
- options: [
267
- {
268
- value: 'both',
269
- label: 'Both import blocks and shell script (Recommended)',
270
- description: 'Maximum compatibility with all Terraform versions',
271
- },
272
- {
273
- value: 'blocks',
274
- label: 'Import blocks only (Terraform 1.5+)',
275
- description: 'Modern declarative imports in .tf files',
276
- },
277
- {
278
- value: 'script',
279
- label: 'Shell script only',
280
- description: 'Traditional terraform import commands',
281
- },
282
- {
283
- value: 'none',
284
- label: 'No imports',
285
- description: 'Generate resource definitions only',
286
- },
287
- ],
288
- defaultValue: 'both',
289
- });
290
-
291
- // Terraform version
292
- ui.newLine();
293
- const terraformVersion = await select({
294
- message: 'Target Terraform version:',
295
- options: [
296
- { value: '1.5.0', label: '1.5.0+', description: 'Supports import blocks' },
297
- { value: '1.4.0', label: '1.4.0', description: 'Latest stable without import blocks' },
298
- { value: '1.3.0', label: '1.3.0', description: 'Older version' },
299
- ],
300
- defaultValue: ctx.terraformVersion || '1.5.0',
301
- });
302
-
303
- // Starter kit
304
- ui.newLine();
305
- const includeStarterKit = await confirm({
306
- message: 'Include starter kit (README, .gitignore, Makefile)?',
307
- defaultValue: true,
308
- });
309
-
310
- return {
311
- success: true,
312
- data: {
313
- organizeByService: organizeChoice === 'service',
314
- generateImportBlocks: importMethod === 'both' || importMethod === 'blocks',
315
- generateImportScript: importMethod === 'both' || importMethod === 'script',
316
- terraformVersion,
317
- includeReadme: includeStarterKit,
318
- includeGitignore: includeStarterKit,
319
- includeMakefile: includeStarterKit,
320
- },
321
- };
322
- }
323
-
324
- /**
325
- * Step 2: Output Location
326
- */
327
- async function outputLocationStep(ctx: AwsTerraformContext): Promise<StepResult> {
328
- const outputPath = await pathInput(
329
- 'Where should the Terraform files be saved?',
330
- ctx.outputPath || './terraform-aws'
331
- );
332
-
333
- if (!outputPath) {
334
- return { success: false, error: 'Output path is required' };
335
- }
336
-
337
- // Check if directory exists
338
- const exists = fs.existsSync(outputPath);
339
- if (exists) {
340
- const files = fs.readdirSync(outputPath);
341
- if (files.length > 0) {
342
- ui.newLine();
343
- ui.warning(`Directory ${outputPath} is not empty (${files.length} files)`);
344
-
345
- const overwrite = await confirm({
346
- message: 'Overwrite existing files?',
347
- defaultValue: false,
348
- });
349
-
350
- if (!overwrite) {
351
- return { success: false, error: 'User cancelled - directory not empty' };
352
- }
353
- }
354
- }
355
-
356
- return {
357
- success: true,
358
- data: { outputPath },
359
- };
360
- }
361
-
362
- /**
363
- * Step 3: Generate Terraform using local generator
364
- */
365
- async function generateStep(ctx: AwsTerraformContext): Promise<StepResult> {
366
- ui.startSpinner({ message: 'Generating Terraform configurations...' });
367
-
368
- try {
369
- // Derive components from discovered resources
370
- const resourceTypes = (ctx.resources ?? []).map(r => r.type);
371
- const components: string[] = [];
372
- if (resourceTypes.some(t => t.includes('VPC') || t.includes('Subnet'))) components.push('vpc');
373
- if (resourceTypes.some(t => t.includes('EC2') || t.includes('Instance'))) components.push('ec2');
374
- if (resourceTypes.some(t => t.includes('S3'))) components.push('s3');
375
- if (resourceTypes.some(t => t.includes('RDS'))) components.push('rds');
376
- if (resourceTypes.some(t => t.includes('EKS'))) components.push('eks');
377
- if (components.length === 0) components.push('vpc', 's3');
378
-
379
- const generatedProject = await generateTerraformProject({
380
- projectName: 'infrastructure',
381
- provider: 'aws',
382
- region: ctx.resources?.[0]?.region || 'us-east-1',
383
- components,
384
- });
385
-
386
- const fileMap: Record<string, string> = {};
387
- for (const file of generatedProject.files) {
388
- fileMap[file.path] = file.content;
389
- }
390
-
391
- const summary: GenerationSummary = {
392
- totalResources: ctx.resources?.length ?? 0,
393
- mappedResources: ctx.resources?.length ?? 0,
394
- unmappedResources: 0,
395
- filesGenerated: generatedProject.files.length,
396
- servicesIncluded: components,
397
- regionsIncluded: [...new Set((ctx.resources ?? []).map(r => r.region).filter(Boolean))],
398
- };
399
-
400
- ui.stopSpinnerSuccess(`Generated ${Object.keys(fileMap).length} file(s)`);
401
-
402
- // Add starter kit files if requested
403
- if (ctx.includeReadme) fileMap['README.md'] = generateReadme(summary);
404
- if (ctx.includeGitignore) fileMap['.gitignore'] = generateGitignore();
405
- if (ctx.includeMakefile) fileMap['Makefile'] = generateMakefile();
406
-
407
- return {
408
- success: true,
409
- data: {
410
- generatedFiles: fileMap,
411
- summary,
412
- },
413
- };
414
- } catch (error: any) {
415
- ui.stopSpinnerFail(`Generation failed: ${error.message}`);
416
- return { success: false, error: error.message };
417
- }
418
- }
419
-
420
- /**
421
- * Step 4: Write Files
422
- */
423
- async function writeFilesStep(ctx: AwsTerraformContext): Promise<StepResult> {
424
- if (!ctx.generatedFiles || !ctx.outputPath) {
425
- return { success: false, error: 'No files to write' };
426
- }
427
-
428
- ui.startSpinner({ message: 'Writing files to disk...' });
429
-
430
- try {
431
- // Create output directory
432
- if (!fs.existsSync(ctx.outputPath)) {
433
- fs.mkdirSync(ctx.outputPath, { recursive: true });
434
- }
435
-
436
- // Write each file
437
- const fileNames = Object.keys(ctx.generatedFiles);
438
- for (const fileName of fileNames) {
439
- const filePath = path.join(ctx.outputPath, fileName);
440
- const content = ctx.generatedFiles[fileName];
441
-
442
- // Create subdirectories if needed
443
- const dir = path.dirname(filePath);
444
- if (!fs.existsSync(dir)) {
445
- fs.mkdirSync(dir, { recursive: true });
446
- }
447
-
448
- await writeFile(filePath, content, 'utf-8');
449
- }
450
-
451
- // Make import script executable
452
- if (ctx.generatedFiles['import.sh']) {
453
- const scriptPath = path.join(ctx.outputPath, 'import.sh');
454
- fs.chmodSync(scriptPath, '755');
455
- }
456
-
457
- ui.stopSpinnerSuccess(`Wrote ${fileNames.length} files to ${ctx.outputPath}`);
458
-
459
- return {
460
- success: true,
461
- data: { filesWritten: fileNames.length },
462
- };
463
- } catch (error: any) {
464
- ui.stopSpinnerFail(`Failed to write files: ${error.message}`);
465
- return { success: false, error: error.message };
466
- }
467
- }
468
-
469
- /**
470
- * Generate README.md content
471
- */
472
- function generateReadme(summary: GenerationSummary): string {
473
- return `# Terraform AWS Infrastructure
474
-
475
- Generated by Nimbus CLI
476
-
477
- ## Summary
478
-
479
- - **Total Resources**: ${summary.totalResources}
480
- - **Mapped Resources**: ${summary.mappedResources}
481
- - **Unmapped Resources**: ${summary.unmappedResources}
482
- - **Files Generated**: ${summary.filesGenerated}
483
-
484
- ### Services
485
-
486
- ${summary.servicesIncluded.map(s => `- ${s}`).join('\n')}
487
-
488
- ### Regions
489
-
490
- ${summary.regionsIncluded.map(r => `- ${r}`).join('\n')}
491
-
492
- ## Getting Started
493
-
494
- 1. **Initialize Terraform**:
495
- \`\`\`bash
496
- terraform init
497
- \`\`\`
498
-
499
- 2. **Import existing resources** (choose one):
500
-
501
- Using import blocks (Terraform 1.5+):
502
- \`\`\`bash
503
- terraform plan -generate-config-out=generated.tf
504
- \`\`\`
505
-
506
- Using import script:
507
- \`\`\`bash
508
- ./import.sh
509
- \`\`\`
510
-
511
- 3. **Review the plan**:
512
- \`\`\`bash
513
- terraform plan
514
- \`\`\`
515
-
516
- 4. **Apply changes** (should show no changes if imports were successful):
517
- \`\`\`bash
518
- terraform apply
519
- \`\`\`
520
-
521
- ## File Structure
522
-
523
- - \`providers.tf\` - AWS provider configuration
524
- - \`variables.tf\` - Input variables
525
- - \`outputs.tf\` - Output values
526
- - \`*.tf\` - Resource definitions by service
527
- - \`import.sh\` - Import script for existing resources
528
-
529
- ## Notes
530
-
531
- - Review all generated configurations before applying
532
- - Some sensitive values may need to be filled in manually
533
- - Consider using Terraform workspaces for different environments
534
- `;
535
- }
536
-
537
- /**
538
- * Generate .gitignore content
539
- */
540
- function generateGitignore(): string {
541
- return `# Terraform
542
- *.tfstate
543
- *.tfstate.*
544
- .terraform/
545
- .terraform.lock.hcl
546
- crash.log
547
- crash.*.log
548
- *.tfvars
549
- *.tfvars.json
550
- override.tf
551
- override.tf.json
552
- *_override.tf
553
- *_override.tf.json
554
-
555
- # Sensitive files
556
- *.pem
557
- *.key
558
- .env
559
- .env.*
560
-
561
- # IDE
562
- .idea/
563
- .vscode/
564
- *.swp
565
- *.swo
566
-
567
- # OS
568
- .DS_Store
569
- Thumbs.db
570
- `;
571
- }
572
-
573
- /**
574
- * Generate Makefile content
575
- */
576
- function generateMakefile(): string {
577
- return `# Terraform Makefile
578
-
579
- .PHONY: init plan apply destroy fmt validate import clean
580
-
581
- # Initialize Terraform
582
- init:
583
- terraform init
584
-
585
- # Plan changes
586
- plan:
587
- terraform plan
588
-
589
- # Apply changes
590
- apply:
591
- terraform apply
592
-
593
- # Destroy infrastructure
594
- destroy:
595
- terraform destroy
596
-
597
- # Format code
598
- fmt:
599
- terraform fmt -recursive
600
-
601
- # Validate configuration
602
- validate:
603
- terraform validate
604
-
605
- # Import existing resources
606
- import:
607
- ./import.sh
608
-
609
- # Clean up
610
- clean:
611
- rm -rf .terraform
612
- rm -f .terraform.lock.hcl
613
-
614
- # Full workflow
615
- all: init fmt validate plan
616
- `;
617
- }
618
-
619
- /**
620
- * Display completion message
621
- */
622
- function displayCompletionMessage(ctx: AwsTerraformContext): void {
623
- ui.newLine();
624
- ui.box({
625
- title: 'Terraform Generation Complete!',
626
- content: [
627
- `Output: ${ctx.outputPath}`,
628
- `Files: ${Object.keys(ctx.generatedFiles || {}).length}`,
629
- '',
630
- 'Summary:',
631
- ` Resources: ${ctx.summary?.mappedResources || 0} mapped, ${ctx.summary?.unmappedResources || 0} unmapped`,
632
- ` Services: ${ctx.summary?.servicesIncluded?.join(', ') || 'N/A'}`,
633
- '',
634
- 'Next steps:',
635
- ` 1. cd ${ctx.outputPath}`,
636
- ' 2. terraform init',
637
- ' 3. ./import.sh # Import existing resources',
638
- ' 4. terraform plan',
639
- ],
640
- style: 'rounded',
641
- borderColor: 'green',
642
- padding: 1,
643
- });
644
- }
645
-
646
- /**
647
- * Run in non-interactive mode
648
- */
649
- async function runNonInteractive(options: AwsTerraformOptions): Promise<void> {
650
- ui.header('nimbus aws terraform', 'Non-interactive mode');
651
-
652
- // Must have either session ID, resources file, or profile for discovery
653
- if (!options.sessionId && !options.resourcesFile && !options.profile) {
654
- ui.error('One of --session-id, --resources-file, or --profile is required');
655
- process.exit(1);
656
- }
657
-
658
- let resources: DiscoveredResource[] | undefined;
659
-
660
- // Load from file if specified
661
- if (options.resourcesFile) {
662
- ui.startSpinner({ message: 'Loading resources from file...' });
663
- try {
664
- const fileContent = await readFile(options.resourcesFile, 'utf-8');
665
- const data = JSON.parse(fileContent);
666
- resources = data.resources || data;
667
- ui.stopSpinnerSuccess(`Loaded ${resources!.length} resources`);
668
- } catch (error: any) {
669
- ui.stopSpinnerFail(`Failed to load resources: ${error.message}`);
670
- process.exit(1);
671
- }
672
- }
673
- // Run discovery if profile specified
674
- else if (options.profile && !options.sessionId) {
675
- const discoveryOptions: AwsDiscoverOptions = {
676
- profile: options.profile,
677
- regions: options.regions,
678
- services: options.services,
679
- nonInteractive: true,
680
- };
681
-
682
- const inventory = await awsDiscoverCommand(discoveryOptions);
683
- if (!inventory) {
684
- ui.error('Discovery failed');
685
- process.exit(1);
686
- }
687
- resources = inventory.resources;
688
- }
689
-
690
- // Generate Terraform using local generator
691
- ui.startSpinner({ message: 'Generating Terraform configurations...' });
692
-
693
- try {
694
- const resourceTypes = (resources ?? []).map(r => r.type);
695
- const components: string[] = [];
696
- if (resourceTypes.some(t => t.includes('VPC') || t.includes('Subnet'))) components.push('vpc');
697
- if (resourceTypes.some(t => t.includes('EC2') || t.includes('Instance'))) components.push('ec2');
698
- if (resourceTypes.some(t => t.includes('S3'))) components.push('s3');
699
- if (resourceTypes.some(t => t.includes('RDS'))) components.push('rds');
700
- if (resourceTypes.some(t => t.includes('EKS'))) components.push('eks');
701
- if (components.length === 0) components.push('vpc', 's3');
702
-
703
- const generatedProject = await generateTerraformProject({
704
- projectName: 'infrastructure',
705
- provider: 'aws',
706
- region: resources?.[0]?.region || 'us-east-1',
707
- components,
708
- });
709
-
710
- const files: Record<string, string> = {};
711
- for (const file of generatedProject.files) {
712
- files[file.path] = file.content;
713
- }
714
-
715
- const summary: GenerationSummary = {
716
- totalResources: resources?.length ?? 0,
717
- mappedResources: resources?.length ?? 0,
718
- unmappedResources: 0,
719
- filesGenerated: generatedProject.files.length,
720
- servicesIncluded: components,
721
- regionsIncluded: [...new Set((resources ?? []).map(r => r.region).filter(Boolean))],
722
- };
723
-
724
- ui.stopSpinnerSuccess(`Generated ${Object.keys(files).length} file(s)`);
725
-
726
- // Write files
727
- const outputPath = options.output || './terraform-aws';
728
- ui.startSpinner({ message: 'Writing files...' });
729
-
730
- if (!fs.existsSync(outputPath)) {
731
- fs.mkdirSync(outputPath, { recursive: true });
732
- }
733
-
734
- if (options.includeStarterKit || options.includeReadme) files['README.md'] = generateReadme(summary);
735
- if (options.includeStarterKit || options.includeGitignore) files['.gitignore'] = generateGitignore();
736
- if (options.includeStarterKit || options.includeMakefile) files['Makefile'] = generateMakefile();
737
-
738
- for (const [fileName, content] of Object.entries(files)) {
739
- const filePath = path.join(outputPath, fileName);
740
- await writeFile(filePath, content as string, 'utf-8');
741
- }
742
-
743
- ui.stopSpinnerSuccess(`Wrote ${Object.keys(files).length} files to ${outputPath}`);
744
-
745
- ui.newLine();
746
- ui.success('Generation complete!');
747
- ui.print(` Output: ${outputPath}`);
748
- ui.print(` Resources: ${summary.mappedResources} mapped`);
749
- } catch (error: any) {
750
- ui.stopSpinnerFail(`Generation failed: ${error.message}`);
751
- process.exit(1);
752
- }
753
- }
754
-
755
- export default awsTerraformCommand;