@friggframework/devtools 2.0.0--canary.522.cbd3d5a.0 → 2.0.0--canary.517.21b69ac.0

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 (247) hide show
  1. package/.eslintrc.json +3 -0
  2. package/CHANGELOG.md +132 -0
  3. package/frigg-cli/README.md +1 -1
  4. package/frigg-cli/__tests__/unit/commands/doctor.test.js +2 -0
  5. package/frigg-cli/__tests__/unit/commands/install.test.js +17 -21
  6. package/frigg-cli/doctor-command/index.js +16 -17
  7. package/frigg-cli/index.js +6 -21
  8. package/frigg-cli/index.test.js +1 -7
  9. package/frigg-cli/init-command/backend-first-handler.js +42 -124
  10. package/frigg-cli/init-command/index.js +1 -2
  11. package/frigg-cli/init-command/template-handler.js +3 -13
  12. package/frigg-cli/install-command/backend-js.js +3 -3
  13. package/frigg-cli/install-command/environment-variables.js +19 -16
  14. package/frigg-cli/install-command/environment-variables.test.js +13 -12
  15. package/frigg-cli/install-command/index.js +9 -14
  16. package/frigg-cli/install-command/integration-file.js +3 -3
  17. package/frigg-cli/install-command/logger.js +12 -0
  18. package/frigg-cli/install-command/validate-package.js +9 -5
  19. package/frigg-cli/jest.config.js +1 -4
  20. package/frigg-cli/repair-command/index.js +128 -101
  21. package/frigg-cli/start-command/index.js +2 -246
  22. package/frigg-cli/ui-command/index.js +36 -58
  23. package/frigg-cli/utils/repo-detection.js +37 -85
  24. package/infrastructure/docs/iam-policy-templates.md +1 -1
  25. package/infrastructure/domains/networking/vpc-builder.test.js +4 -2
  26. package/infrastructure/domains/networking/vpc-resolver.test.js +1 -1
  27. package/infrastructure/domains/shared/cloudformation-discovery.test.js +7 -4
  28. package/infrastructure/domains/shared/resource-discovery.js +5 -5
  29. package/infrastructure/domains/shared/types/discovery-result.test.js +1 -1
  30. package/infrastructure/domains/shared/utilities/base-definition-factory.js +2 -25
  31. package/infrastructure/domains/shared/utilities/base-definition-factory.test.js +2 -2
  32. package/infrastructure/infrastructure-composer.test.js +2 -2
  33. package/layers/prisma/.build-complete +3 -0
  34. package/layers/prisma/nodejs/package.json +8 -0
  35. package/management-ui/.eslintrc.js +22 -0
  36. package/management-ui/README.md +109 -245
  37. package/management-ui/components.json +21 -0
  38. package/management-ui/docs/phase2-integration-guide.md +320 -0
  39. package/management-ui/index.html +13 -0
  40. package/management-ui/package.json +76 -0
  41. package/management-ui/packages/devtools/frigg-cli/ui-command/index.js +302 -0
  42. package/management-ui/postcss.config.js +6 -0
  43. package/management-ui/server/api/backend.js +256 -0
  44. package/management-ui/server/api/cli.js +315 -0
  45. package/management-ui/server/api/codegen.js +663 -0
  46. package/management-ui/server/api/connections.js +857 -0
  47. package/management-ui/server/api/discovery.js +185 -0
  48. package/management-ui/server/api/environment/index.js +1 -0
  49. package/management-ui/server/api/environment/router.js +378 -0
  50. package/management-ui/server/api/environment.js +328 -0
  51. package/management-ui/server/api/integrations.js +876 -0
  52. package/management-ui/server/api/logs.js +248 -0
  53. package/management-ui/server/api/monitoring.js +282 -0
  54. package/management-ui/server/api/open-ide.js +31 -0
  55. package/management-ui/server/api/project.js +1029 -0
  56. package/management-ui/server/api/users/sessions.js +371 -0
  57. package/management-ui/server/api/users/simulation.js +254 -0
  58. package/management-ui/server/api/users.js +362 -0
  59. package/management-ui/server/api-contract.md +275 -0
  60. package/management-ui/server/index.js +873 -0
  61. package/management-ui/server/middleware/errorHandler.js +93 -0
  62. package/management-ui/server/middleware/security.js +32 -0
  63. package/management-ui/server/processManager.js +296 -0
  64. package/management-ui/server/server.js +346 -0
  65. package/management-ui/server/services/aws-monitor.js +413 -0
  66. package/management-ui/server/services/npm-registry.js +347 -0
  67. package/management-ui/server/services/template-engine.js +538 -0
  68. package/management-ui/server/utils/cliIntegration.js +220 -0
  69. package/management-ui/server/utils/environment/auditLogger.js +471 -0
  70. package/management-ui/server/utils/environment/awsParameterStore.js +275 -0
  71. package/management-ui/server/utils/environment/encryption.js +278 -0
  72. package/management-ui/server/utils/environment/envFileManager.js +286 -0
  73. package/management-ui/server/utils/import-commonjs.js +28 -0
  74. package/management-ui/server/utils/response.js +83 -0
  75. package/management-ui/server/websocket/handler.js +325 -0
  76. package/management-ui/src/App.jsx +25 -0
  77. package/management-ui/src/assets/FriggLogo.svg +1 -0
  78. package/management-ui/src/components/AppRouter.jsx +65 -0
  79. package/management-ui/src/components/Button.jsx +70 -0
  80. package/management-ui/src/components/Card.jsx +97 -0
  81. package/management-ui/src/components/EnvironmentCompare.jsx +400 -0
  82. package/management-ui/src/components/EnvironmentEditor.jsx +372 -0
  83. package/management-ui/src/components/EnvironmentImportExport.jsx +469 -0
  84. package/management-ui/src/components/EnvironmentSchema.jsx +491 -0
  85. package/management-ui/src/components/EnvironmentSecurity.jsx +463 -0
  86. package/management-ui/src/components/ErrorBoundary.jsx +73 -0
  87. package/management-ui/src/components/IntegrationCard.jsx +481 -0
  88. package/management-ui/src/components/IntegrationCardEnhanced.jsx +770 -0
  89. package/management-ui/src/components/IntegrationExplorer.jsx +379 -0
  90. package/management-ui/src/components/IntegrationStatus.jsx +336 -0
  91. package/management-ui/src/components/Layout.jsx +716 -0
  92. package/management-ui/src/components/LoadingSpinner.jsx +113 -0
  93. package/management-ui/src/components/RepositoryPicker.jsx +248 -0
  94. package/management-ui/src/components/SessionMonitor.jsx +350 -0
  95. package/management-ui/src/components/StatusBadge.jsx +208 -0
  96. package/management-ui/src/components/UserContextSwitcher.jsx +212 -0
  97. package/management-ui/src/components/UserSimulation.jsx +327 -0
  98. package/management-ui/src/components/Welcome.jsx +434 -0
  99. package/management-ui/src/components/codegen/APIEndpointGenerator.jsx +637 -0
  100. package/management-ui/src/components/codegen/APIModuleSelector.jsx +227 -0
  101. package/management-ui/src/components/codegen/CodeGenerationWizard.jsx +247 -0
  102. package/management-ui/src/components/codegen/CodePreviewEditor.jsx +316 -0
  103. package/management-ui/src/components/codegen/DynamicModuleForm.jsx +271 -0
  104. package/management-ui/src/components/codegen/FormBuilder.jsx +737 -0
  105. package/management-ui/src/components/codegen/IntegrationGenerator.jsx +855 -0
  106. package/management-ui/src/components/codegen/ProjectScaffoldWizard.jsx +797 -0
  107. package/management-ui/src/components/codegen/SchemaBuilder.jsx +303 -0
  108. package/management-ui/src/components/codegen/TemplateSelector.jsx +586 -0
  109. package/management-ui/src/components/codegen/index.js +10 -0
  110. package/management-ui/src/components/connections/ConnectionConfigForm.jsx +362 -0
  111. package/management-ui/src/components/connections/ConnectionHealthMonitor.jsx +182 -0
  112. package/management-ui/src/components/connections/ConnectionTester.jsx +200 -0
  113. package/management-ui/src/components/connections/EntityRelationshipMapper.jsx +292 -0
  114. package/management-ui/src/components/connections/OAuthFlow.jsx +204 -0
  115. package/management-ui/src/components/connections/index.js +5 -0
  116. package/management-ui/src/components/index.js +21 -0
  117. package/management-ui/src/components/monitoring/APIGatewayMetrics.jsx +222 -0
  118. package/management-ui/src/components/monitoring/LambdaMetrics.jsx +169 -0
  119. package/management-ui/src/components/monitoring/MetricsChart.jsx +197 -0
  120. package/management-ui/src/components/monitoring/MonitoringDashboard.jsx +393 -0
  121. package/management-ui/src/components/monitoring/SQSMetrics.jsx +246 -0
  122. package/management-ui/src/components/monitoring/index.js +6 -0
  123. package/management-ui/src/components/monitoring/monitoring.css +218 -0
  124. package/management-ui/src/components/theme-provider.jsx +52 -0
  125. package/management-ui/src/components/theme-toggle.jsx +39 -0
  126. package/management-ui/src/components/ui/badge.tsx +36 -0
  127. package/management-ui/src/components/ui/button.test.jsx +56 -0
  128. package/management-ui/src/components/ui/button.tsx +57 -0
  129. package/management-ui/src/components/ui/card.tsx +76 -0
  130. package/management-ui/src/components/ui/dropdown-menu.tsx +199 -0
  131. package/management-ui/src/components/ui/select.tsx +157 -0
  132. package/management-ui/src/components/ui/skeleton.jsx +15 -0
  133. package/management-ui/src/hooks/useFrigg.jsx +387 -0
  134. package/management-ui/src/hooks/useSocket.jsx +58 -0
  135. package/management-ui/src/index.css +193 -0
  136. package/management-ui/src/lib/utils.ts +6 -0
  137. package/management-ui/src/main.jsx +10 -0
  138. package/management-ui/src/pages/CodeGeneration.jsx +14 -0
  139. package/management-ui/src/pages/Connections.jsx +252 -0
  140. package/management-ui/src/pages/ConnectionsEnhanced.jsx +633 -0
  141. package/management-ui/src/pages/Dashboard.jsx +311 -0
  142. package/management-ui/src/pages/Environment.jsx +314 -0
  143. package/management-ui/src/pages/IntegrationConfigure.jsx +669 -0
  144. package/management-ui/src/pages/IntegrationDiscovery.jsx +567 -0
  145. package/management-ui/src/pages/IntegrationTest.jsx +742 -0
  146. package/management-ui/src/pages/Integrations.jsx +253 -0
  147. package/management-ui/src/pages/Monitoring.jsx +17 -0
  148. package/management-ui/src/pages/Simulation.jsx +155 -0
  149. package/management-ui/src/pages/Users.jsx +492 -0
  150. package/management-ui/src/services/api.js +41 -0
  151. package/management-ui/src/services/apiModuleService.js +193 -0
  152. package/management-ui/src/services/websocket-handlers.js +120 -0
  153. package/management-ui/src/test/api/project.test.js +273 -0
  154. package/management-ui/src/test/components/Welcome.test.jsx +378 -0
  155. package/management-ui/src/test/mocks/server.js +178 -0
  156. package/management-ui/src/test/setup.js +61 -0
  157. package/management-ui/src/test/utils/test-utils.jsx +134 -0
  158. package/management-ui/src/utils/repository.js +98 -0
  159. package/management-ui/src/utils/repository.test.js +118 -0
  160. package/management-ui/src/workflows/phase2-integration-workflows.js +884 -0
  161. package/management-ui/tailwind.config.js +63 -0
  162. package/management-ui/tsconfig.json +37 -0
  163. package/management-ui/tsconfig.node.json +10 -0
  164. package/management-ui/vite.config.js +26 -0
  165. package/management-ui/vitest.config.js +38 -0
  166. package/package.json +7 -17
  167. package/frigg-cli/__tests__/application/use-cases/AddApiModuleToIntegrationUseCase.test.js +0 -326
  168. package/frigg-cli/__tests__/application/use-cases/CreateApiModuleUseCase.test.js +0 -337
  169. package/frigg-cli/__tests__/domain/entities/ApiModule.test.js +0 -373
  170. package/frigg-cli/__tests__/domain/entities/AppDefinition.test.js +0 -313
  171. package/frigg-cli/__tests__/domain/services/IntegrationValidator.test.js +0 -269
  172. package/frigg-cli/__tests__/domain/value-objects/IntegrationName.test.js +0 -82
  173. package/frigg-cli/__tests__/infrastructure/adapters/IntegrationJsUpdater.test.js +0 -408
  174. package/frigg-cli/__tests__/infrastructure/repositories/FileSystemApiModuleRepository.test.js +0 -583
  175. package/frigg-cli/__tests__/infrastructure/repositories/FileSystemAppDefinitionRepository.test.js +0 -314
  176. package/frigg-cli/__tests__/infrastructure/repositories/FileSystemIntegrationRepository.test.js +0 -430
  177. package/frigg-cli/__tests__/unit/commands/init.test.js +0 -406
  178. package/frigg-cli/__tests__/unit/commands/repair.test.js +0 -275
  179. package/frigg-cli/__tests__/unit/start-command/application/RunPreflightChecksUseCase.test.js +0 -411
  180. package/frigg-cli/__tests__/unit/start-command/infrastructure/DatabaseAdapter.test.js +0 -405
  181. package/frigg-cli/__tests__/unit/start-command/infrastructure/DockerAdapter.test.js +0 -496
  182. package/frigg-cli/__tests__/unit/start-command/presentation/InteractivePromptAdapter.test.js +0 -474
  183. package/frigg-cli/__tests__/unit/utils/output.test.js +0 -196
  184. package/frigg-cli/application/use-cases/AddApiModuleToIntegrationUseCase.js +0 -93
  185. package/frigg-cli/application/use-cases/CreateApiModuleUseCase.js +0 -93
  186. package/frigg-cli/application/use-cases/CreateIntegrationUseCase.js +0 -103
  187. package/frigg-cli/container.js +0 -172
  188. package/frigg-cli/docs/OUTPUT_MIGRATION_GUIDE.md +0 -286
  189. package/frigg-cli/domain/entities/ApiModule.js +0 -272
  190. package/frigg-cli/domain/entities/AppDefinition.js +0 -227
  191. package/frigg-cli/domain/entities/Integration.js +0 -198
  192. package/frigg-cli/domain/exceptions/DomainException.js +0 -24
  193. package/frigg-cli/domain/ports/IApiModuleRepository.js +0 -53
  194. package/frigg-cli/domain/ports/IAppDefinitionRepository.js +0 -43
  195. package/frigg-cli/domain/ports/IIntegrationRepository.js +0 -61
  196. package/frigg-cli/domain/services/IntegrationValidator.js +0 -185
  197. package/frigg-cli/domain/value-objects/IntegrationId.js +0 -42
  198. package/frigg-cli/domain/value-objects/IntegrationName.js +0 -60
  199. package/frigg-cli/domain/value-objects/SemanticVersion.js +0 -70
  200. package/frigg-cli/infrastructure/UnitOfWork.js +0 -46
  201. package/frigg-cli/infrastructure/adapters/BackendJsUpdater.js +0 -197
  202. package/frigg-cli/infrastructure/adapters/FileSystemAdapter.js +0 -224
  203. package/frigg-cli/infrastructure/adapters/IntegrationJsUpdater.js +0 -249
  204. package/frigg-cli/infrastructure/adapters/SchemaValidator.js +0 -92
  205. package/frigg-cli/infrastructure/repositories/FileSystemApiModuleRepository.js +0 -373
  206. package/frigg-cli/infrastructure/repositories/FileSystemAppDefinitionRepository.js +0 -116
  207. package/frigg-cli/infrastructure/repositories/FileSystemIntegrationRepository.js +0 -277
  208. package/frigg-cli/package-lock.json +0 -16226
  209. package/frigg-cli/start-command/application/RunPreflightChecksUseCase.js +0 -376
  210. package/frigg-cli/start-command/infrastructure/DatabaseAdapter.js +0 -591
  211. package/frigg-cli/start-command/infrastructure/DockerAdapter.js +0 -306
  212. package/frigg-cli/start-command/presentation/InteractivePromptAdapter.js +0 -329
  213. package/frigg-cli/templates/backend/.env.example +0 -62
  214. package/frigg-cli/templates/backend/.eslintrc.json +0 -12
  215. package/frigg-cli/templates/backend/.prettierrc +0 -6
  216. package/frigg-cli/templates/backend/docker-compose.yml +0 -22
  217. package/frigg-cli/templates/backend/index.js +0 -96
  218. package/frigg-cli/templates/backend/infrastructure.js +0 -12
  219. package/frigg-cli/templates/backend/jest.config.js +0 -17
  220. package/frigg-cli/templates/backend/package.json +0 -50
  221. package/frigg-cli/templates/backend/src/api-modules/.gitkeep +0 -10
  222. package/frigg-cli/templates/backend/src/base/.gitkeep +0 -7
  223. package/frigg-cli/templates/backend/src/integrations/.gitkeep +0 -10
  224. package/frigg-cli/templates/backend/src/integrations/ExampleIntegration.js +0 -65
  225. package/frigg-cli/templates/backend/src/utils/.gitkeep +0 -7
  226. package/frigg-cli/templates/backend/test/setup.js +0 -30
  227. package/frigg-cli/templates/backend/ui-extensions/.gitkeep +0 -0
  228. package/frigg-cli/templates/backend/ui-extensions/README.md +0 -77
  229. package/frigg-cli/utils/__tests__/repo-detection.test.js +0 -436
  230. package/frigg-cli/utils/output.js +0 -382
  231. package/frigg-cli/validate-command/__tests__/adapters/validate-command.test.js +0 -205
  232. package/frigg-cli/validate-command/__tests__/application/validate-app-use-case.test.js +0 -104
  233. package/frigg-cli/validate-command/__tests__/domain/fix-suggestion.test.js +0 -153
  234. package/frigg-cli/validate-command/__tests__/domain/validation-error.test.js +0 -162
  235. package/frigg-cli/validate-command/__tests__/domain/validation-result.test.js +0 -152
  236. package/frigg-cli/validate-command/__tests__/infrastructure/api-module-validator.test.js +0 -332
  237. package/frigg-cli/validate-command/__tests__/infrastructure/app-definition-validator.test.js +0 -191
  238. package/frigg-cli/validate-command/__tests__/infrastructure/integration-class-validator.test.js +0 -146
  239. package/frigg-cli/validate-command/__tests__/infrastructure/template-validation.test.js +0 -155
  240. package/frigg-cli/validate-command/adapters/cli/validate-command.js +0 -199
  241. package/frigg-cli/validate-command/application/use-cases/validate-app-use-case.js +0 -35
  242. package/frigg-cli/validate-command/domain/entities/validation-result.js +0 -74
  243. package/frigg-cli/validate-command/domain/value-objects/fix-suggestion.js +0 -74
  244. package/frigg-cli/validate-command/domain/value-objects/validation-error.js +0 -68
  245. package/frigg-cli/validate-command/infrastructure/validators/api-module-validator.js +0 -181
  246. package/frigg-cli/validate-command/infrastructure/validators/app-definition-validator.js +0 -128
  247. package/frigg-cli/validate-command/infrastructure/validators/integration-class-validator.js +0 -113
package/.eslintrc.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "@friggframework/eslint-config"
3
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,132 @@
1
+ # v1.2.0 (Tue Aug 06 2024)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - CLI for Frigg - Install command for now [#322](https://github.com/friggframework/frigg/pull/322) ([@seanspeaks](https://github.com/seanspeaks))
6
+
7
+ #### 🐛 Bug Fix
8
+
9
+ - Add READMEs that will need updating, but for version releasing [#324](https://github.com/friggframework/frigg/pull/324) ([@seanspeaks](https://github.com/seanspeaks))
10
+ - Add READMEs that will need updating, but for version releasing ([@seanspeaks](https://github.com/seanspeaks))
11
+ - small update to integration testing / tooling [#304](https://github.com/friggframework/frigg/pull/304) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
12
+ - Added missing dependencies ([@seanspeaks](https://github.com/seanspeaks))
13
+ - Added a missing dependency ([@seanspeaks](https://github.com/seanspeaks))
14
+ - Updated to handle envs properly, also further refactoring, and better templating. ([@seanspeaks](https://github.com/seanspeaks))
15
+ - WIP with help from Tabnine AI chat. ([@seanspeaks](https://github.com/seanspeaks))
16
+ - Bump version to: v1.1.8 \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
17
+ - use the factory methods for creating the mock integration so that everything is set up (mostly events and userActions) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
18
+ - Bump version to: v1.1.5 \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
19
+
20
+ #### Authors: 2
21
+
22
+ - [@MichaelRyanWebber](https://github.com/MichaelRyanWebber)
23
+ - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
24
+
25
+ ---
26
+
27
+ # v1.1.8 (Thu Jul 18 2024)
28
+
29
+ #### 🐛 Bug Fix
30
+
31
+ - Revert open to support commonjs [#319](https://github.com/friggframework/frigg/pull/319) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
32
+ - Bump version to: v1.1.6 \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
33
+
34
+ #### Authors: 2
35
+
36
+ - [@MichaelRyanWebber](https://github.com/MichaelRyanWebber)
37
+ - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
38
+
39
+ ---
40
+
41
+ # v1.1.7 (Mon Jul 15 2024)
42
+
43
+ #### 🐛 Bug Fix
44
+
45
+ - getAuthorizationRequirements() async [#318](https://github.com/friggframework/frigg/pull/318) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
46
+ - await getAuthorizeRequirements() ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
47
+ - Bump version to: v1.1.6 \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
48
+
49
+ #### Authors: 2
50
+
51
+ - [@MichaelRyanWebber](https://github.com/MichaelRyanWebber)
52
+ - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
53
+
54
+ ---
55
+
56
+ # v1.1.6 (Fri Apr 26 2024)
57
+
58
+ #### 🐛 Bug Fix
59
+
60
+ - Small fix to validation errors and cleanup [#307](https://github.com/friggframework/frigg/pull/307) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
61
+ - also cleanup devtools since all versions will bump ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
62
+ - Bump version to: v1.1.5 \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
63
+
64
+ #### Authors: 2
65
+
66
+ - [@MichaelRyanWebber](https://github.com/MichaelRyanWebber)
67
+ - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
68
+
69
+ ---
70
+
71
+ # v1.1.5 (Tue Apr 09 2024)
72
+
73
+ #### 🐛 Bug Fix
74
+
75
+ - update router to include options and refresh [#301](https://github.com/friggframework/frigg/pull/301) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
76
+ - Bump version to: v1.1.4 \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
77
+ - Bump version to: v1.1.3 \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
78
+
79
+ #### Authors: 2
80
+
81
+ - [@MichaelRyanWebber](https://github.com/MichaelRyanWebber)
82
+ - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
83
+
84
+ ---
85
+
86
+ # v2.0.0 (Sat Mar 30 2024)
87
+
88
+ #### 💥 Breaking Change
89
+
90
+ - revert HEAD to a corrected v1-connectwise release [#283](https://github.com/friggframework/frigg/pull/283) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
91
+
92
+ #### 🚀 Enhancement
93
+
94
+ - Package redo [#294](https://github.com/friggframework/frigg/pull/294) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
95
+
96
+ #### 🐛 Bug Fix
97
+
98
+ - delete all node_modules and regenerate lock file to potentially address known bug ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
99
+ - add back the direct dependency on eslint as this might be leading to a deploy issue ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
100
+ - create test, eslint-config and prettier-config packages as base shared dependencies ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
101
+ - slight fix to mock integration module instantiation [#290](https://github.com/friggframework/frigg/pull/290) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
102
+ - slight fix to mock integration module instantiation ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
103
+ - Publish ([@seanspeaks](https://github.com/seanspeaks))
104
+ - Bump node and npm version for the whole repo (Fix CI) [#274](https://github.com/friggframework/frigg/pull/274) ([@seanspeaks](https://github.com/seanspeaks))
105
+ - Revert main to last release [#284](https://github.com/friggframework/frigg/pull/284) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
106
+ - Revert "set test environment STAGE to dev" ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
107
+ - Add stage to test env [#282](https://github.com/friggframework/frigg/pull/282) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
108
+ - set test environment STAGE to dev ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
109
+ - Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
110
+
111
+ #### Authors: 2
112
+
113
+ - [@MichaelRyanWebber](https://github.com/MichaelRyanWebber)
114
+ - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
115
+
116
+ ---
117
+
118
+ # v1.1.0 (Wed Mar 20 2024)
119
+
120
+ #### 🚀 Enhancement
121
+
122
+
123
+ #### 🐛 Bug Fix
124
+
125
+ - correct some bad automated edits, though they are not in relevant files ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber))
126
+
127
+ #### Authors: 4
128
+
129
+ - [@MichaelRyanWebber](https://github.com/MichaelRyanWebber)
130
+ - Nicolas Leal ([@nicolasmelo1](https://github.com/nicolasmelo1))
131
+ - nmilcoff ([@nmilcoff](https://github.com/nmilcoff))
132
+ - Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
@@ -1281,7 +1281,7 @@ npm install @friggframework/frigg-cli@latest
1281
1281
  npm install -g @friggframework/frigg-cli
1282
1282
 
1283
1283
  # Local project dependencies
1284
- frigg init my-app
1284
+ npx create-frigg-app my-app
1285
1285
  # (Will automatically include @friggframework/frigg-cli in package.json)
1286
1286
  ```
1287
1287
 
@@ -3,6 +3,8 @@
3
3
  * Tests stack listing, selection, and health check orchestration
4
4
  */
5
5
 
6
+ const { describe, test, expect, jest, beforeEach } = require('@jest/globals');
7
+
6
8
  describe('Doctor Command - Stack Listing and Selection', () => {
7
9
  let mockCloudFormationClient;
8
10
  let mockSelect;
@@ -45,11 +45,11 @@ const { handleEnvVariables } = require('../../../install-command/environment-var
45
45
  const { validatePackageExists, searchAndSelectPackage } = require('../../../install-command/validate-package');
46
46
  const { findNearestBackendPackageJson, validateBackendPath } = require('@friggframework/core');
47
47
  const { installCommand } = require('../../../install-command');
48
- const output = require('../../../utils/output');
49
48
 
50
49
  describe('CLI Command: install', () => {
51
50
  let processExitSpy;
52
-
51
+ let consoleLogSpy;
52
+ let consoleErrorSpy;
53
53
  const mockBackendPath = '/mock/backend/package.json';
54
54
  const mockBackendDir = '/mock/backend';
55
55
 
@@ -59,14 +59,9 @@ describe('CLI Command: install', () => {
59
59
  // Mock process.exit to prevent actual exit
60
60
  processExitSpy = jest.spyOn(process, 'exit').mockImplementation();
61
61
 
62
- // Mock output module
63
- output.success = jest.fn();
64
- output.error = jest.fn();
65
- output.spinner = jest.fn().mockReturnValue({
66
- start: jest.fn(),
67
- succeed: jest.fn(),
68
- fail: jest.fn()
69
- });
62
+ // Spy on console for logger (don't mock logger - test it!)
63
+ consoleLogSpy = jest.spyOn(console, 'log').mockImplementation();
64
+ consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation();
70
65
 
71
66
  // Setup fs-extra mocks - Let Frigg code run, just mock I/O
72
67
  fs.ensureDirSync = jest.fn();
@@ -103,7 +98,8 @@ describe('CLI Command: install', () => {
103
98
 
104
99
  afterEach(() => {
105
100
  processExitSpy.mockRestore();
106
-
101
+ consoleLogSpy.mockRestore();
102
+ consoleErrorSpy.mockRestore();
107
103
  jest.resetModules(); // Clear module cache after each test
108
104
  });
109
105
 
@@ -209,9 +205,9 @@ describe('CLI Command: install', () => {
209
205
  it('should log info messages during installation', async () => {
210
206
  await installCommand('slack');
211
207
 
212
- // Verify output.spinner was used for installation progress
213
- expect(output.spinner).toHaveBeenCalledWith(
214
- expect.stringContaining('Installing integration for Slack')
208
+ // Verify logger actually logged (we spy on console)
209
+ expect(consoleLogSpy).toHaveBeenCalledWith(
210
+ expect.stringContaining('Successfully installed @friggframework/api-module-slack')
215
211
  );
216
212
  });
217
213
 
@@ -338,8 +334,8 @@ describe('CLI Command: install', () => {
338
334
 
339
335
  await installCommand('slack');
340
336
 
341
- // Verify error logged via output.error
342
- expect(output.error).toHaveBeenCalledWith('An error occurred:', error);
337
+ // Verify error logged via console.error (we spy on it)
338
+ expect(consoleErrorSpy).toHaveBeenCalledWith('An error occurred:', error);
343
339
  expect(processExitSpy).toHaveBeenCalledWith(1);
344
340
  });
345
341
 
@@ -349,7 +345,7 @@ describe('CLI Command: install', () => {
349
345
 
350
346
  await installCommand('slack');
351
347
 
352
- expect(output.error).toHaveBeenCalledWith('An error occurred:', error);
348
+ expect(consoleErrorSpy).toHaveBeenCalledWith('An error occurred:', error);
353
349
  expect(processExitSpy).toHaveBeenCalledWith(1);
354
350
  });
355
351
 
@@ -361,7 +357,7 @@ describe('CLI Command: install', () => {
361
357
 
362
358
  await installCommand('slack');
363
359
 
364
- expect(output.error).toHaveBeenCalledWith('An error occurred:', error);
360
+ expect(consoleErrorSpy).toHaveBeenCalledWith('An error occurred:', error);
365
361
  expect(processExitSpy).toHaveBeenCalledWith(1);
366
362
  });
367
363
 
@@ -374,7 +370,7 @@ describe('CLI Command: install', () => {
374
370
 
375
371
  await installCommand('slack');
376
372
 
377
- expect(output.error).toHaveBeenCalledWith('An error occurred:', expect.any(Error));
373
+ expect(consoleErrorSpy).toHaveBeenCalledWith('An error occurred:', expect.any(Error));
378
374
  expect(processExitSpy).toHaveBeenCalledWith(1);
379
375
  });
380
376
 
@@ -387,7 +383,7 @@ describe('CLI Command: install', () => {
387
383
 
388
384
  await installCommand('slack');
389
385
 
390
- expect(output.error).toHaveBeenCalledWith('An error occurred:', expect.any(Error));
386
+ expect(consoleErrorSpy).toHaveBeenCalledWith('An error occurred:', expect.any(Error));
391
387
  expect(processExitSpy).toHaveBeenCalledWith(1);
392
388
  });
393
389
 
@@ -397,7 +393,7 @@ describe('CLI Command: install', () => {
397
393
 
398
394
  await installCommand('slack');
399
395
 
400
- expect(output.error).toHaveBeenCalledWith('An error occurred:', error);
396
+ expect(consoleErrorSpy).toHaveBeenCalledWith('An error occurred:', error);
401
397
  expect(processExitSpy).toHaveBeenCalledWith(1);
402
398
  });
403
399
  });
@@ -12,9 +12,8 @@
12
12
  */
13
13
 
14
14
  const path = require('path');
15
- const output = require('../utils/output');
16
15
  const fs = require('fs');
17
- // Using output.select from unified Output class (wraps @inquirer/prompts)
16
+ const { select } = require('@inquirer/prompts');
18
17
  const { CloudFormationClient, ListStacksCommand } = require('@aws-sdk/client-cloudformation');
19
18
 
20
19
  // Domain and Application Layer
@@ -161,9 +160,9 @@ function formatJsonOutput(report) {
161
160
  function writeOutputFile(content, filePath) {
162
161
  try {
163
162
  fs.writeFileSync(filePath, content, 'utf8');
164
- output.success(` Report saved to: ${filePath}`);
163
+ console.log(`\n✓ Report saved to: ${filePath}`);
165
164
  } catch (error) {
166
- output.error(` Failed to write output file: ${error.message}`);
165
+ console.error(`\n✗ Failed to write output file: ${error.message}`);
167
166
  process.exit(1);
168
167
  }
169
168
  }
@@ -205,17 +204,17 @@ async function listStacks(region) {
205
204
  * @returns {Promise<string>} Selected stack name
206
205
  */
207
206
  async function promptForStackSelection(region) {
208
- output.info(`🔍 Fetching CloudFormation stacks in ${region}...`);
207
+ console.log(`\n🔍 Fetching CloudFormation stacks in ${region}...`);
209
208
 
210
209
  const stacks = await listStacks(region);
211
210
 
212
211
  if (stacks.length === 0) {
213
- output.error(` No CloudFormation stacks found in ${region}`);
214
- output.log(' Make sure you have stacks deployed and the correct AWS credentials configured.');
212
+ console.error(`\n✗ No CloudFormation stacks found in ${region}`);
213
+ console.log(' Make sure you have stacks deployed and the correct AWS credentials configured.');
215
214
  process.exit(1);
216
215
  }
217
216
 
218
- output.success(` Found ${stacks.length} stack(s)\n`);
217
+ console.log(`\n✓ Found ${stacks.length} stack(s)\n`);
219
218
 
220
219
  // Create choices with stack name and metadata
221
220
  const choices = stacks.map(stack => {
@@ -231,7 +230,7 @@ async function promptForStackSelection(region) {
231
230
  };
232
231
  });
233
232
 
234
- const selectedStack = await output.select({
233
+ const selectedStack = await select({
235
234
  message: 'Select a stack to run health check:',
236
235
  choices,
237
236
  pageSize: 15,
@@ -258,7 +257,7 @@ async function doctorCommand(stackName, options = {}) {
258
257
  }
259
258
 
260
259
  // Show progress to user (always, not just verbose mode)
261
- output.info(`🏥 Running health check on stack: ${stackName} (${region})\n`);
260
+ console.log(`\n🏥 Running health check on stack: ${stackName} (${region})\n`);
262
261
 
263
262
  // 1. Create stack identifier
264
263
  const stackIdentifier = new StackIdentifier({ stackName, region });
@@ -282,9 +281,9 @@ async function doctorCommand(stackName, options = {}) {
282
281
  // Progress callback to show execution status
283
282
  const progressCallback = (step, message) => {
284
283
  if (verbose) {
285
- output.log(` ${message}`);
284
+ console.log(` ${message}`);
286
285
  } else {
287
- output.log(`${step} ${message}`);
286
+ console.log(`${step} ${message}`);
288
287
  }
289
288
  };
290
289
 
@@ -293,7 +292,7 @@ async function doctorCommand(stackName, options = {}) {
293
292
  onProgress: progressCallback
294
293
  });
295
294
 
296
- output.success(' Health check complete!\n');
295
+ console.log(' Health check complete!\n');
297
296
 
298
297
  // 5. Format and output results
299
298
  if (format === 'json') {
@@ -302,11 +301,11 @@ async function doctorCommand(stackName, options = {}) {
302
301
  if (options.output) {
303
302
  writeOutputFile(jsonOutput, options.output);
304
303
  } else {
305
- output.log(jsonOutput);
304
+ console.log(jsonOutput);
306
305
  }
307
306
  } else {
308
307
  const consoleOutput = formatConsoleOutput(report, options);
309
- output.log(consoleOutput);
308
+ console.log(consoleOutput);
310
309
 
311
310
  if (options.output) {
312
311
  writeOutputFile(consoleOutput, options.output);
@@ -323,10 +322,10 @@ async function doctorCommand(stackName, options = {}) {
323
322
  process.exit(0);
324
323
  }
325
324
  } catch (error) {
326
- output.error(` Health check failed: ${error.message}`);
325
+ console.error(`\n✗ Health check failed: ${error.message}`);
327
326
 
328
327
  if (options.verbose && error.stack) {
329
- output.error(`\nStack trace:\n${error.stack}`);
328
+ console.error(`\nStack trace:\n${error.stack}`);
330
329
  }
331
330
 
332
331
  process.exit(1);
@@ -85,23 +85,15 @@ const { uiCommand } = require('./ui-command');
85
85
  const { dbSetupCommand } = require('./db-setup-command');
86
86
  const { doctorCommand } = require('./doctor-command');
87
87
  const { repairCommand } = require('./repair-command');
88
- const { createValidateCommand } = require('./validate-command/adapters/cli/validate-command');
89
88
 
90
89
  const program = new Command();
91
90
 
92
- // Add version command using package.json version
93
- const packageJson = require('./package.json');
94
91
  program
95
- .version(packageJson.version, '-v, --version', 'output the current version');
96
-
97
- program
98
- .command('init <projectName>')
92
+ .command('init [templateName]')
99
93
  .description('Initialize a new Frigg application')
100
- .option('-m, --mode <mode>', 'deployment mode: standalone or embedded')
101
- .option('-f, --force', 'overwrite existing files')
102
- .option('--frontend <value>', 'include demo frontend (true/false)')
103
- .option('-y, --yes', 'accept defaults without prompting')
104
- .option('--verbose', 'enable verbose output')
94
+ .option('-t, --template <template>', 'template to use', 'backend-only')
95
+ .option('-n, --name <name>', 'project name')
96
+ .option('-d, --directory <directory>', 'target directory')
105
97
  .action(initCommand);
106
98
 
107
99
  program
@@ -114,8 +106,6 @@ program
114
106
  .description('Run the backend and optional frontend')
115
107
  .option('-s, --stage <stage>', 'deployment stage', 'dev')
116
108
  .option('-v, --verbose', 'enable verbose output')
117
- .option('--ipc', 'enable IPC mode for Management UI communication')
118
- .option('--no-interactive', 'skip interactive pre-flight prompts')
119
109
  .action(startCommand);
120
110
 
121
111
  program
@@ -178,11 +168,6 @@ program
178
168
  .option('-v, --verbose', 'enable verbose output')
179
169
  .action(repairCommand);
180
170
 
181
- createValidateCommand(program);
182
-
183
- // Only parse arguments when run directly, not when imported by tests
184
- if (require.main === module) {
185
- program.parse(process.argv);
186
- }
171
+ program.parse(process.argv);
187
172
 
188
- module.exports = { initCommand, installCommand, startCommand, buildCommand, deployCommand, generateIamCommand, uiCommand, dbSetupCommand, doctorCommand, repairCommand, createValidateCommand, program };
173
+ module.exports = { initCommand, installCommand, startCommand, buildCommand, deployCommand, generateIamCommand, uiCommand, dbSetupCommand, doctorCommand, repairCommand };
@@ -8,13 +8,7 @@ const { updateBackendJsFile } = require('./install-command/backend-js');
8
8
  const { commitChanges } = require('./install-command/commit-changes');
9
9
  const { logInfo, logError } = require('./install-command/logger');
10
10
 
11
- /**
12
- * @group unit
13
- * @group infrastructure
14
- */
15
- // TODO: Fix these tests - they have issues with Commander.js mocking
16
- // The mocks need to be set up before the module is loaded, not inline in tests
17
- describe.skip('CLI Command Tests', () => {
11
+ describe('CLI Command Tests', () => {
18
12
  it('should successfully install an API module when all steps complete without errors', async () => {
19
13
  const mockApiModuleName = 'testModule';
20
14
  const mockPackageName = `@friggframework/api-module-${mockApiModuleName}`;