@friggframework/devtools 2.0.0--canary.400.bed3308.0 → 2.0.0--canary.400.545e7a8.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 (167) hide show
  1. package/frigg-cli/build-command/index.js +2 -15
  2. package/frigg-cli/deploy-command/index.js +2 -15
  3. package/frigg-cli/index.js +4 -66
  4. package/frigg-cli/install-command/index.js +2 -15
  5. package/frigg-cli/start-command/index.js +2 -17
  6. package/infrastructure/AWS-IAM-CREDENTIAL-NEEDS.md +19 -43
  7. package/infrastructure/IAM-POLICY-TEMPLATES.md +1 -1
  8. package/infrastructure/frigg-deployment-iam-stack.yaml +2 -16
  9. package/infrastructure/iam-generator.js +6 -129
  10. package/infrastructure/iam-policy-basic.json +5 -29
  11. package/infrastructure/iam-policy-full.json +5 -28
  12. package/infrastructure/serverless-template.js +3 -190
  13. package/infrastructure/serverless-template.test.js +0 -12
  14. package/management-ui/dist/assets/index-CbM64Oba.js +1221 -0
  15. package/management-ui/dist/assets/index-CkvseXTC.css +1 -0
  16. package/management-ui/{index.html → dist/index.html} +2 -1
  17. package/package.json +5 -5
  18. package/frigg-cli/.eslintrc.js +0 -141
  19. package/frigg-cli/__tests__/jest.config.js +0 -102
  20. package/frigg-cli/__tests__/unit/commands/build.test.js +0 -483
  21. package/frigg-cli/__tests__/unit/commands/install.test.js +0 -418
  22. package/frigg-cli/__tests__/unit/commands/ui.test.js +0 -592
  23. package/frigg-cli/__tests__/utils/command-tester.js +0 -170
  24. package/frigg-cli/__tests__/utils/mock-factory.js +0 -270
  25. package/frigg-cli/__tests__/utils/test-fixtures.js +0 -463
  26. package/frigg-cli/__tests__/utils/test-setup.js +0 -286
  27. package/frigg-cli/generate-command/__tests__/generate-command.test.js +0 -312
  28. package/frigg-cli/generate-command/azure-generator.js +0 -43
  29. package/frigg-cli/generate-command/gcp-generator.js +0 -47
  30. package/frigg-cli/generate-command/index.js +0 -350
  31. package/frigg-cli/generate-command/terraform-generator.js +0 -555
  32. package/frigg-cli/package.json +0 -75
  33. package/frigg-cli/ui-command/index.js +0 -167
  34. package/frigg-cli/utils/app-resolver.js +0 -319
  35. package/frigg-cli/utils/backend-path.js +0 -38
  36. package/frigg-cli/utils/process-manager.js +0 -199
  37. package/frigg-cli/utils/repo-detection.js +0 -405
  38. package/management-ui/.eslintrc.js +0 -22
  39. package/management-ui/README.md +0 -203
  40. package/management-ui/components.json +0 -21
  41. package/management-ui/merge-conflict-cleaner.py +0 -371
  42. package/management-ui/package-lock.json +0 -10997
  43. package/management-ui/package.json +0 -76
  44. package/management-ui/postcss.config.js +0 -6
  45. package/management-ui/server/api/backend.js +0 -256
  46. package/management-ui/server/api/cli.js +0 -315
  47. package/management-ui/server/api/codegen.js +0 -663
  48. package/management-ui/server/api/connections.js +0 -857
  49. package/management-ui/server/api/discovery.js +0 -185
  50. package/management-ui/server/api/environment/index.js +0 -1
  51. package/management-ui/server/api/environment/router.js +0 -378
  52. package/management-ui/server/api/environment.js +0 -328
  53. package/management-ui/server/api/integrations.js +0 -479
  54. package/management-ui/server/api/logs.js +0 -248
  55. package/management-ui/server/api/monitoring.js +0 -282
  56. package/management-ui/server/api/open-ide.js +0 -31
  57. package/management-ui/server/api/project.js +0 -553
  58. package/management-ui/server/api/users/sessions.js +0 -371
  59. package/management-ui/server/api/users/simulation.js +0 -254
  60. package/management-ui/server/api/users.js +0 -362
  61. package/management-ui/server/api-contract.md +0 -275
  62. package/management-ui/server/index.js +0 -428
  63. package/management-ui/server/middleware/errorHandler.js +0 -70
  64. package/management-ui/server/middleware/security.js +0 -32
  65. package/management-ui/server/processManager.js +0 -296
  66. package/management-ui/server/server.js +0 -188
  67. package/management-ui/server/services/aws-monitor.js +0 -413
  68. package/management-ui/server/services/npm-registry.js +0 -347
  69. package/management-ui/server/services/template-engine.js +0 -538
  70. package/management-ui/server/utils/cliIntegration.js +0 -220
  71. package/management-ui/server/utils/environment/auditLogger.js +0 -471
  72. package/management-ui/server/utils/environment/awsParameterStore.js +0 -264
  73. package/management-ui/server/utils/environment/encryption.js +0 -278
  74. package/management-ui/server/utils/environment/envFileManager.js +0 -286
  75. package/management-ui/server/utils/import-commonjs.js +0 -28
  76. package/management-ui/server/utils/response.js +0 -83
  77. package/management-ui/server/websocket/handler.js +0 -325
  78. package/management-ui/src/App.jsx +0 -51
  79. package/management-ui/src/components/AppRouter.jsx +0 -65
  80. package/management-ui/src/components/Button.jsx +0 -2
  81. package/management-ui/src/components/Card.jsx +0 -9
  82. package/management-ui/src/components/EnvironmentCompare.jsx +0 -400
  83. package/management-ui/src/components/EnvironmentEditor.jsx +0 -372
  84. package/management-ui/src/components/EnvironmentImportExport.jsx +0 -469
  85. package/management-ui/src/components/EnvironmentSchema.jsx +0 -491
  86. package/management-ui/src/components/EnvironmentSecurity.jsx +0 -463
  87. package/management-ui/src/components/ErrorBoundary.jsx +0 -73
  88. package/management-ui/src/components/IntegrationCard.jsx +0 -199
  89. package/management-ui/src/components/IntegrationCardEnhanced.jsx +0 -490
  90. package/management-ui/src/components/IntegrationExplorer.jsx +0 -379
  91. package/management-ui/src/components/IntegrationStatus.jsx +0 -235
  92. package/management-ui/src/components/Layout.jsx +0 -250
  93. package/management-ui/src/components/LoadingSpinner.jsx +0 -45
  94. package/management-ui/src/components/RepositoryPicker.jsx +0 -248
  95. package/management-ui/src/components/SessionMonitor.jsx +0 -255
  96. package/management-ui/src/components/StatusBadge.jsx +0 -70
  97. package/management-ui/src/components/UserContextSwitcher.jsx +0 -154
  98. package/management-ui/src/components/UserSimulation.jsx +0 -299
  99. package/management-ui/src/components/Welcome.jsx +0 -434
  100. package/management-ui/src/components/codegen/APIEndpointGenerator.jsx +0 -637
  101. package/management-ui/src/components/codegen/APIModuleSelector.jsx +0 -227
  102. package/management-ui/src/components/codegen/CodeGenerationWizard.jsx +0 -247
  103. package/management-ui/src/components/codegen/CodePreviewEditor.jsx +0 -316
  104. package/management-ui/src/components/codegen/DynamicModuleForm.jsx +0 -271
  105. package/management-ui/src/components/codegen/FormBuilder.jsx +0 -737
  106. package/management-ui/src/components/codegen/IntegrationGenerator.jsx +0 -855
  107. package/management-ui/src/components/codegen/ProjectScaffoldWizard.jsx +0 -797
  108. package/management-ui/src/components/codegen/SchemaBuilder.jsx +0 -303
  109. package/management-ui/src/components/codegen/TemplateSelector.jsx +0 -586
  110. package/management-ui/src/components/codegen/index.js +0 -10
  111. package/management-ui/src/components/connections/ConnectionConfigForm.jsx +0 -362
  112. package/management-ui/src/components/connections/ConnectionHealthMonitor.jsx +0 -182
  113. package/management-ui/src/components/connections/ConnectionTester.jsx +0 -200
  114. package/management-ui/src/components/connections/EntityRelationshipMapper.jsx +0 -292
  115. package/management-ui/src/components/connections/OAuthFlow.jsx +0 -204
  116. package/management-ui/src/components/connections/index.js +0 -5
  117. package/management-ui/src/components/index.js +0 -21
  118. package/management-ui/src/components/monitoring/APIGatewayMetrics.jsx +0 -222
  119. package/management-ui/src/components/monitoring/LambdaMetrics.jsx +0 -169
  120. package/management-ui/src/components/monitoring/MetricsChart.jsx +0 -197
  121. package/management-ui/src/components/monitoring/MonitoringDashboard.jsx +0 -393
  122. package/management-ui/src/components/monitoring/SQSMetrics.jsx +0 -246
  123. package/management-ui/src/components/monitoring/index.js +0 -6
  124. package/management-ui/src/components/monitoring/monitoring.css +0 -218
  125. package/management-ui/src/components/theme-provider.jsx +0 -52
  126. package/management-ui/src/components/theme-toggle.jsx +0 -39
  127. package/management-ui/src/components/ui/badge.tsx +0 -36
  128. package/management-ui/src/components/ui/button.test.jsx +0 -56
  129. package/management-ui/src/components/ui/button.tsx +0 -57
  130. package/management-ui/src/components/ui/card.tsx +0 -76
  131. package/management-ui/src/components/ui/dropdown-menu.tsx +0 -199
  132. package/management-ui/src/components/ui/select.tsx +0 -157
  133. package/management-ui/src/components/ui/skeleton.jsx +0 -15
  134. package/management-ui/src/hooks/useFrigg.jsx +0 -387
  135. package/management-ui/src/hooks/useSocket.jsx +0 -58
  136. package/management-ui/src/index.css +0 -194
  137. package/management-ui/src/lib/utils.ts +0 -6
  138. package/management-ui/src/main.jsx +0 -10
  139. package/management-ui/src/pages/CodeGeneration.jsx +0 -14
  140. package/management-ui/src/pages/Connections.jsx +0 -252
  141. package/management-ui/src/pages/ConnectionsEnhanced.jsx +0 -427
  142. package/management-ui/src/pages/Dashboard.jsx +0 -311
  143. package/management-ui/src/pages/Environment.jsx +0 -314
  144. package/management-ui/src/pages/IntegrationConfigure.jsx +0 -544
  145. package/management-ui/src/pages/IntegrationDiscovery.jsx +0 -479
  146. package/management-ui/src/pages/IntegrationTest.jsx +0 -494
  147. package/management-ui/src/pages/Integrations.jsx +0 -254
  148. package/management-ui/src/pages/Monitoring.jsx +0 -17
  149. package/management-ui/src/pages/Simulation.jsx +0 -155
  150. package/management-ui/src/pages/Users.jsx +0 -492
  151. package/management-ui/src/services/api.js +0 -41
  152. package/management-ui/src/services/apiModuleService.js +0 -193
  153. package/management-ui/src/services/websocket-handlers.js +0 -120
  154. package/management-ui/src/test/api/project.test.js +0 -273
  155. package/management-ui/src/test/components/Welcome.test.jsx +0 -378
  156. package/management-ui/src/test/mocks/server.js +0 -178
  157. package/management-ui/src/test/setup.js +0 -61
  158. package/management-ui/src/test/utils/test-utils.jsx +0 -134
  159. package/management-ui/src/utils/repository.js +0 -98
  160. package/management-ui/src/utils/repository.test.js +0 -118
  161. package/management-ui/src/workflows/phase2-integration-workflows.js +0 -884
  162. package/management-ui/tailwind.config.js +0 -63
  163. package/management-ui/tsconfig.json +0 -37
  164. package/management-ui/tsconfig.node.json +0 -10
  165. package/management-ui/vite.config.js +0 -26
  166. package/management-ui/vitest.config.js +0 -38
  167. /package/management-ui/{src/assets/FriggLogo.svg → dist/assets/FriggLogo-B7Xx8ZW1.svg} +0 -0
@@ -1,299 +0,0 @@
1
- import React, { useState, useEffect } from 'react'
2
- import { Play, Square, AlertCircle, CheckCircle, Clock, Zap } from 'lucide-react'
3
- import { useFrigg } from '../hooks/useFrigg'
4
- import { useSocket } from '../hooks/useSocket'
5
- import api from '../services/api'
6
- import { cn } from '../lib/utils'
7
-
8
- const UserSimulation = ({ user, integration }) => {
9
- const { currentUser } = useFrigg()
10
- const { on } = useSocket()
11
- const [isSimulating, setIsSimulating] = useState(false)
12
- const [session, setSession] = useState(null)
13
- const [logs, setLogs] = useState([])
14
- const [selectedAction, setSelectedAction] = useState('list')
15
- const [actionPayload, setActionPayload] = useState('')
16
-
17
- const simulationUser = user || currentUser
18
-
19
- useEffect(() => {
20
- // Listen for simulation events
21
- const unsubscribeAuth = on('simulation:auth', (data) => {
22
- addLog('Authentication', data.session)
23
- })
24
-
25
- const unsubscribeAction = on('simulation:action', (data) => {
26
- addLog('Action Performed', data.actionResult)
27
- })
28
-
29
- const unsubscribeWebhook = on('simulation:webhook', (data) => {
30
- addLog('Webhook Event', data.webhookEvent)
31
- })
32
-
33
- return () => {
34
- unsubscribeAuth && unsubscribeAuth()
35
- unsubscribeAction && unsubscribeAction()
36
- unsubscribeWebhook && unsubscribeWebhook()
37
- }
38
- }, [on])
39
-
40
- const addLog = (type, data) => {
41
- setLogs(prev => [{
42
- id: Date.now(),
43
- type,
44
- data,
45
- timestamp: new Date().toISOString()
46
- }, ...prev].slice(0, 50)) // Keep last 50 logs
47
- }
48
-
49
- const startSimulation = async () => {
50
- if (!simulationUser || !integration) {
51
- alert('Please select a user and integration')
52
- return
53
- }
54
-
55
- try {
56
- setIsSimulating(true)
57
- const response = await api.post('/api/users/simulation/authenticate', {
58
- userId: simulationUser.id,
59
- integrationId: integration.id
60
- })
61
-
62
- setSession(response.data.session)
63
- addLog('Session Started', response.data.session)
64
- } catch (error) {
65
- console.error('Failed to start simulation:', error)
66
- alert('Failed to start simulation')
67
- setIsSimulating(false)
68
- }
69
- }
70
-
71
- const stopSimulation = async () => {
72
- if (!session) return
73
-
74
- try {
75
- await api.delete(`/api/users/simulation/sessions/${session.sessionId}`)
76
- setSession(null)
77
- setIsSimulating(false)
78
- addLog('Session Ended', { sessionId: session.sessionId })
79
- } catch (error) {
80
- console.error('Failed to stop simulation:', error)
81
- }
82
- }
83
-
84
- const performAction = async () => {
85
- if (!session) return
86
-
87
- try {
88
- let payload = {}
89
- if (actionPayload) {
90
- try {
91
- payload = JSON.parse(actionPayload)
92
- } catch {
93
- payload = { data: actionPayload }
94
- }
95
- }
96
-
97
- const response = await api.post('/api/users/simulation/action', {
98
- sessionId: session.sessionId,
99
- action: selectedAction,
100
- payload
101
- })
102
-
103
- addLog('Action Result', response.data.actionResult)
104
- } catch (error) {
105
- console.error('Failed to perform action:', error)
106
- alert('Failed to perform action')
107
- }
108
- }
109
-
110
- const simulateWebhook = async () => {
111
- if (!simulationUser || !integration) return
112
-
113
- try {
114
- const response = await api.post('/api/users/simulation/webhook', {
115
- userId: simulationUser.id,
116
- integrationId: integration.id,
117
- event: 'data.updated',
118
- data: {
119
- id: 'webhook_item_' + Date.now(),
120
- changes: ['field1', 'field2'],
121
- timestamp: new Date().toISOString()
122
- }
123
- })
124
-
125
- addLog('Webhook Simulated', response.data.webhookEvent)
126
- } catch (error) {
127
- console.error('Failed to simulate webhook:', error)
128
- alert('Failed to simulate webhook')
129
- }
130
- }
131
-
132
- const commonActions = [
133
- { value: 'list', label: 'List Items' },
134
- { value: 'create', label: 'Create Item' },
135
- { value: 'update', label: 'Update Item' },
136
- { value: 'delete', label: 'Delete Item' },
137
- { value: 'sync', label: 'Sync Data' }
138
- ]
139
-
140
- return (
141
- <div className="bg-white rounded-lg shadow p-6">
142
- <div className="mb-6">
143
- <h3 className="text-lg font-semibold text-gray-900 mb-2">User Simulation</h3>
144
- <p className="text-sm text-gray-600">
145
- Simulate user interactions with integrations for testing
146
- </p>
147
- </div>
148
-
149
- {/* Simulation Controls */}
150
- <div className="space-y-4 mb-6">
151
- <div className="flex items-center justify-between p-4 bg-gray-50 rounded-lg">
152
- <div>
153
- <p className="text-sm font-medium text-gray-900">
154
- {simulationUser ? `${simulationUser.firstName} ${simulationUser.lastName}` : 'No user selected'}
155
- </p>
156
- <p className="text-xs text-gray-500">
157
- {integration ? integration.name : 'No integration selected'}
158
- </p>
159
- </div>
160
- <div className="flex items-center space-x-2">
161
- {!isSimulating ? (
162
- <button
163
- onClick={startSimulation}
164
- disabled={!simulationUser || !integration}
165
- className={cn(
166
- "flex items-center space-x-2 px-4 py-2 rounded-md transition-colors",
167
- simulationUser && integration
168
- ? "bg-green-600 text-white hover:bg-green-700"
169
- : "bg-gray-300 text-gray-500 cursor-not-allowed"
170
- )}
171
- >
172
- <Play size={16} />
173
- <span>Start Simulation</span>
174
- </button>
175
- ) : (
176
- <button
177
- onClick={stopSimulation}
178
- className="flex items-center space-x-2 px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700"
179
- >
180
- <Square size={16} />
181
- <span>Stop Simulation</span>
182
- </button>
183
- )}
184
- </div>
185
- </div>
186
-
187
- {session && (
188
- <div className="p-4 bg-blue-50 border border-blue-200 rounded-lg">
189
- <div className="flex items-start space-x-3">
190
- <CheckCircle className="text-blue-600 mt-0.5" size={20} />
191
- <div className="flex-1">
192
- <p className="text-sm font-medium text-blue-900">Session Active</p>
193
- <p className="text-xs text-blue-700 mt-1">
194
- Session ID: {session.sessionId}
195
- </p>
196
- <p className="text-xs text-blue-700">
197
- Expires: {new Date(session.expiresAt).toLocaleTimeString()}
198
- </p>
199
- </div>
200
- </div>
201
- </div>
202
- )}
203
- </div>
204
-
205
- {/* Action Simulator */}
206
- {isSimulating && session && (
207
- <div className="space-y-4 mb-6">
208
- <div className="p-4 border border-gray-200 rounded-lg">
209
- <h4 className="text-sm font-medium text-gray-900 mb-3">Simulate Action</h4>
210
- <div className="space-y-3">
211
- <div>
212
- <label className="block text-xs font-medium text-gray-700 mb-1">
213
- Action Type
214
- </label>
215
- <select
216
- value={selectedAction}
217
- onChange={(e) => setSelectedAction(e.target.value)}
218
- className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:border-blue-500"
219
- >
220
- {commonActions.map(action => (
221
- <option key={action.value} value={action.value}>
222
- {action.label}
223
- </option>
224
- ))}
225
- </select>
226
- </div>
227
- <div>
228
- <label className="block text-xs font-medium text-gray-700 mb-1">
229
- Payload (JSON)
230
- </label>
231
- <textarea
232
- value={actionPayload}
233
- onChange={(e) => setActionPayload(e.target.value)}
234
- placeholder='{"name": "Test Item"}'
235
- className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:border-blue-500 font-mono text-xs"
236
- rows={3}
237
- />
238
- </div>
239
- <div className="flex space-x-2">
240
- <button
241
- onClick={performAction}
242
- className="flex items-center space-x-2 px-3 py-1.5 bg-blue-600 text-white text-sm rounded-md hover:bg-blue-700"
243
- >
244
- <Zap size={14} />
245
- <span>Execute Action</span>
246
- </button>
247
- <button
248
- onClick={simulateWebhook}
249
- className="flex items-center space-x-2 px-3 py-1.5 bg-purple-600 text-white text-sm rounded-md hover:bg-purple-700"
250
- >
251
- <AlertCircle size={14} />
252
- <span>Trigger Webhook</span>
253
- </button>
254
- </div>
255
- </div>
256
- </div>
257
- </div>
258
- )}
259
-
260
- {/* Activity Logs */}
261
- <div>
262
- <h4 className="text-sm font-medium text-gray-900 mb-3">Activity Log</h4>
263
- <div className="space-y-2 max-h-64 overflow-y-auto">
264
- {logs.length === 0 ? (
265
- <p className="text-sm text-gray-500 text-center py-4">
266
- No activity yet. Start a simulation to see logs.
267
- </p>
268
- ) : (
269
- logs.map(log => (
270
- <div
271
- key={log.id}
272
- className="p-3 bg-gray-50 rounded-md border border-gray-200"
273
- >
274
- <div className="flex items-start justify-between">
275
- <div className="flex items-center space-x-2">
276
- <Clock size={14} className="text-gray-500" />
277
- <span className="text-xs font-medium text-gray-900">
278
- {log.type}
279
- </span>
280
- </div>
281
- <span className="text-xs text-gray-500">
282
- {new Date(log.timestamp).toLocaleTimeString()}
283
- </span>
284
- </div>
285
- <div className="mt-1">
286
- <pre className="text-xs text-gray-600 font-mono overflow-x-auto">
287
- {JSON.stringify(log.data, null, 2)}
288
- </pre>
289
- </div>
290
- </div>
291
- ))
292
- )}
293
- </div>
294
- </div>
295
- </div>
296
- )
297
- }
298
-
299
- export default UserSimulation