create-fluxstack 1.7.5 → 1.8.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 (154) hide show
  1. package/.dockerignore +82 -0
  2. package/.env.example +19 -0
  3. package/Dockerfile +70 -0
  4. package/README.md +6 -3
  5. package/app/client/SIMPLIFICATION.md +140 -0
  6. package/app/client/frontend-only.ts +1 -1
  7. package/app/client/src/App.tsx +148 -283
  8. package/app/client/src/index.css +5 -20
  9. package/app/client/src/lib/eden-api.ts +53 -220
  10. package/app/client/src/main.tsx +2 -3
  11. package/app/server/app.ts +20 -5
  12. package/app/server/backend-only.ts +15 -12
  13. package/app/server/controllers/users.controller.ts +57 -31
  14. package/app/server/index.ts +86 -96
  15. package/app/server/live/register-components.ts +18 -7
  16. package/app/server/routes/env-test.ts +110 -0
  17. package/app/server/routes/index.ts +1 -8
  18. package/app/server/routes/users.routes.ts +192 -91
  19. package/config/app.config.ts +2 -54
  20. package/config/client.config.ts +95 -0
  21. package/config/fluxstack.config.ts +2 -2
  22. package/config/index.ts +57 -22
  23. package/config/monitoring.config.ts +114 -0
  24. package/config/plugins.config.ts +80 -0
  25. package/config/runtime.config.ts +0 -17
  26. package/config/server.config.ts +50 -30
  27. package/core/build/bundler.ts +17 -16
  28. package/core/build/flux-plugins-generator.ts +34 -23
  29. package/core/build/index.ts +32 -31
  30. package/core/build/live-components-generator.ts +44 -30
  31. package/core/build/optimizer.ts +37 -17
  32. package/core/cli/command-registry.ts +4 -14
  33. package/core/cli/commands/plugin-deps.ts +8 -8
  34. package/core/cli/generators/component.ts +3 -3
  35. package/core/cli/generators/controller.ts +4 -4
  36. package/core/cli/generators/index.ts +8 -8
  37. package/core/cli/generators/interactive.ts +4 -4
  38. package/core/cli/generators/plugin.ts +3 -3
  39. package/core/cli/generators/prompts.ts +1 -1
  40. package/core/cli/generators/route.ts +27 -11
  41. package/core/cli/generators/service.ts +5 -5
  42. package/core/cli/generators/template-engine.ts +1 -1
  43. package/core/cli/generators/types.ts +1 -1
  44. package/core/cli/index.ts +158 -189
  45. package/core/cli/plugin-discovery.ts +3 -3
  46. package/core/client/hooks/index.ts +2 -2
  47. package/core/client/hooks/state-validator.ts +1 -1
  48. package/core/client/hooks/useAuth.ts +1 -1
  49. package/core/client/hooks/useChunkedUpload.ts +1 -1
  50. package/core/client/hooks/useHybridLiveComponent.ts +1 -1
  51. package/core/client/hooks/useWebSocket.ts +1 -1
  52. package/core/config/env.ts +5 -1
  53. package/core/config/runtime-config.ts +12 -10
  54. package/core/config/schema.ts +33 -2
  55. package/core/framework/server.ts +30 -14
  56. package/core/framework/types.ts +2 -2
  57. package/core/index.ts +31 -23
  58. package/core/live/ComponentRegistry.ts +1 -1
  59. package/core/plugins/built-in/live-components/commands/create-live-component.ts +1 -1
  60. package/core/plugins/built-in/live-components/index.ts +1 -1
  61. package/core/plugins/built-in/monitoring/index.ts +65 -161
  62. package/core/plugins/built-in/static/index.ts +75 -277
  63. package/core/plugins/built-in/swagger/index.ts +301 -231
  64. package/core/plugins/built-in/vite/index.ts +342 -377
  65. package/core/plugins/config.ts +2 -2
  66. package/core/plugins/dependency-manager.ts +2 -2
  67. package/core/plugins/discovery.ts +1 -1
  68. package/core/plugins/executor.ts +2 -2
  69. package/core/plugins/manager.ts +19 -4
  70. package/core/plugins/module-resolver.ts +1 -1
  71. package/core/plugins/registry.ts +25 -21
  72. package/core/plugins/types.ts +147 -5
  73. package/core/server/backend-entry.ts +51 -0
  74. package/core/server/framework.ts +2 -2
  75. package/core/server/live/ComponentRegistry.ts +9 -26
  76. package/core/server/live/FileUploadManager.ts +1 -1
  77. package/core/server/live/auto-generated-components.ts +26 -0
  78. package/core/server/live/websocket-plugin.ts +211 -19
  79. package/core/server/middleware/errorHandling.ts +1 -1
  80. package/core/server/middleware/index.ts +4 -4
  81. package/core/server/plugins/database.ts +1 -2
  82. package/core/server/plugins/static-files-plugin.ts +259 -231
  83. package/core/server/plugins/swagger.ts +1 -1
  84. package/core/server/services/BaseService.ts +1 -1
  85. package/core/server/services/ServiceContainer.ts +1 -1
  86. package/core/server/services/index.ts +4 -4
  87. package/core/server/standalone.ts +16 -1
  88. package/core/testing/index.ts +1 -1
  89. package/core/testing/setup.ts +1 -1
  90. package/core/types/plugin.ts +6 -0
  91. package/core/utils/build-logger.ts +324 -0
  92. package/core/utils/config-schema.ts +2 -6
  93. package/core/utils/helpers.ts +14 -9
  94. package/core/utils/logger/startup-banner.ts +7 -33
  95. package/core/utils/regenerate-files.ts +69 -0
  96. package/core/utils/version.ts +6 -6
  97. package/create-fluxstack.ts +68 -25
  98. package/fluxstack.config.ts +138 -252
  99. package/package.json +3 -18
  100. package/plugins/crypto-auth/index.ts +52 -47
  101. package/plugins/crypto-auth/server/AuthMiddleware.ts +1 -1
  102. package/plugins/crypto-auth/server/middlewares/helpers.ts +16 -1
  103. package/vitest.config.ts +17 -26
  104. package/app/client/src/App.css +0 -883
  105. package/app/client/src/components/ErrorBoundary.tsx +0 -107
  106. package/app/client/src/components/ErrorDisplay.css +0 -365
  107. package/app/client/src/components/ErrorDisplay.tsx +0 -258
  108. package/app/client/src/components/FluxStackConfig.tsx +0 -1321
  109. package/app/client/src/components/HybridLiveCounter.tsx +0 -140
  110. package/app/client/src/components/LiveClock.tsx +0 -286
  111. package/app/client/src/components/MainLayout.tsx +0 -388
  112. package/app/client/src/components/SidebarNavigation.tsx +0 -391
  113. package/app/client/src/components/StateDemo.tsx +0 -178
  114. package/app/client/src/components/SystemMonitor.tsx +0 -1044
  115. package/app/client/src/components/UserProfile.tsx +0 -809
  116. package/app/client/src/hooks/useAuth.ts +0 -39
  117. package/app/client/src/hooks/useNotifications.ts +0 -56
  118. package/app/client/src/lib/errors.ts +0 -340
  119. package/app/client/src/lib/hooks/useErrorHandler.ts +0 -258
  120. package/app/client/src/lib/index.ts +0 -45
  121. package/app/client/src/pages/ApiDocs.tsx +0 -182
  122. package/app/client/src/pages/CryptoAuthPage.tsx +0 -394
  123. package/app/client/src/pages/Demo.tsx +0 -174
  124. package/app/client/src/pages/HybridLive.tsx +0 -263
  125. package/app/client/src/pages/Overview.tsx +0 -155
  126. package/app/client/src/store/README.md +0 -43
  127. package/app/client/src/store/index.ts +0 -16
  128. package/app/client/src/store/slices/uiSlice.ts +0 -151
  129. package/app/client/src/store/slices/userSlice.ts +0 -161
  130. package/app/client/src/test/README.md +0 -257
  131. package/app/client/src/test/setup.ts +0 -70
  132. package/app/client/src/test/types.ts +0 -12
  133. package/app/server/live/CounterComponent.ts +0 -191
  134. package/app/server/live/FluxStackConfig.ts +0 -534
  135. package/app/server/live/SidebarNavigation.ts +0 -157
  136. package/app/server/live/SystemMonitor.ts +0 -595
  137. package/app/server/live/SystemMonitorIntegration.ts +0 -151
  138. package/app/server/live/UserProfileComponent.ts +0 -141
  139. package/app/server/middleware/auth.ts +0 -136
  140. package/app/server/middleware/errorHandling.ts +0 -252
  141. package/app/server/middleware/index.ts +0 -10
  142. package/app/server/middleware/rateLimit.ts +0 -193
  143. package/app/server/middleware/requestLogging.ts +0 -215
  144. package/app/server/middleware/validation.ts +0 -270
  145. package/app/server/routes/config.ts +0 -145
  146. package/app/server/routes/crypto-auth-demo.routes.ts +0 -167
  147. package/app/server/routes/example-with-crypto-auth.routes.ts +0 -235
  148. package/app/server/routes/exemplo-posts.routes.ts +0 -161
  149. package/app/server/routes/upload.ts +0 -92
  150. package/app/server/services/NotificationService.ts +0 -302
  151. package/app/server/services/UserService.ts +0 -222
  152. package/app/server/services/index.ts +0 -46
  153. package/app/server/types/index.ts +0 -1
  154. package/config/build.config.ts +0 -24
@@ -4,8 +4,8 @@
4
4
  */
5
5
 
6
6
  import type { FluxStack, PluginConfigSchema, PluginValidationResult } from "./types"
7
- import type { FluxStackConfig } from "../config/schema"
8
- import type { Logger } from "../utils/logger/index"
7
+ import type { FluxStackConfig } from "@/core/config/schema"
8
+ import type { Logger } from "@/core/utils/logger/index"
9
9
 
10
10
  type Plugin = FluxStack.Plugin
11
11
 
@@ -6,7 +6,7 @@
6
6
  import { existsSync, readFileSync, writeFileSync } from 'fs'
7
7
  import { join, resolve } from 'path'
8
8
  import { execSync } from 'child_process'
9
- import type { Logger } from '../utils/logger'
9
+ import type { Logger } from '@/core/utils/logger'
10
10
 
11
11
  export interface PluginDependency {
12
12
  name: string
@@ -176,7 +176,7 @@ export class PluginDependencyManager {
176
176
  /**
177
177
  * Instalar dependências no diretório local do plugin
178
178
  */
179
- private async installPluginDependenciesLocally(pluginPath: string, dependencies: PluginDependency[]): Promise<void> {
179
+ async installPluginDependenciesLocally(pluginPath: string, dependencies: PluginDependency[]): Promise<void> {
180
180
  if (dependencies.length === 0) return
181
181
 
182
182
  const regularDeps = dependencies.filter(d => d.type === 'dependency')
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  import type { FluxStack, PluginManifest, PluginLoadResult, PluginDiscoveryOptions } from "./types"
7
- import type { Logger } from "../utils/logger/index"
7
+ import type { Logger } from "@/core/utils/logger/index"
8
8
  import { readdir, readFile } from "fs/promises"
9
9
  import { join, resolve } from "path"
10
10
  import { existsSync } from "fs"
@@ -10,8 +10,8 @@ import type {
10
10
  PluginPriority,
11
11
  HookExecutionOptions
12
12
  } from "./types"
13
- import type { Logger } from "../utils/logger/index"
14
- import { FluxStackError } from "../utils/errors"
13
+ import type { Logger } from "@/core/utils/logger/index"
14
+ import { FluxStackError } from "@/core/utils/errors"
15
15
 
16
16
  export interface PluginExecutionPlan {
17
17
  hook: PluginHook
@@ -18,13 +18,28 @@ import type {
18
18
  } from "./types"
19
19
 
20
20
  type Plugin = FluxStack.Plugin
21
- import type { FluxStackConfig } from "../config/schema"
22
- import type { Logger } from "../utils/logger"
21
+ import type { FluxStackConfig } from "@/core/config/schema"
22
+ import type { Logger } from "@/core/utils/logger"
23
23
  import { PluginRegistry } from "./registry"
24
24
  import { createPluginUtils } from "./config"
25
- import { FluxStackError } from "../utils/errors"
25
+ import { FluxStackError } from "@/core/utils/errors"
26
26
  import { EventEmitter } from "events"
27
27
 
28
+ /**
29
+ * Helper to safely parse request.url which might be relative or absolute
30
+ */
31
+ function parseRequestURL(request: Request): URL {
32
+ try {
33
+ // Try parsing as absolute URL first
34
+ return new URL(request.url)
35
+ } catch {
36
+ // If relative, use host from headers or default to localhost
37
+ const host = request.headers.get('host') || 'localhost'
38
+ const protocol = request.headers.get('x-forwarded-proto') || 'http'
39
+ return new URL(request.url, `${protocol}://${host}`)
40
+ }
41
+ }
42
+
28
43
  export interface PluginManagerConfig {
29
44
  config: FluxStackConfig
30
45
  logger: Logger
@@ -558,7 +573,7 @@ export class PluginManager extends EventEmitter {
558
573
  * Create request context from HTTP request
559
574
  */
560
575
  export function createRequestContext(request: Request, additionalData: any = {}): RequestContext {
561
- const url = new URL(request.url)
576
+ const url = parseRequestURL(request)
562
577
 
563
578
  return {
564
579
  request,
@@ -5,7 +5,7 @@
5
5
 
6
6
  import { existsSync } from 'fs'
7
7
  import { join, resolve } from 'path'
8
- import type { Logger } from '../utils/logger'
8
+ import type { Logger } from '@/core/utils/logger'
9
9
 
10
10
  export interface ModuleResolverConfig {
11
11
  projectRoot: string
@@ -1,9 +1,9 @@
1
1
  import type { FluxStack, PluginManifest, PluginLoadResult, PluginDiscoveryOptions } from "./types"
2
2
 
3
3
  type FluxStackPlugin = FluxStack.Plugin
4
- import type { FluxStackConfig } from "../config/schema"
5
- import type { Logger } from "../utils/logger"
6
- import { FluxStackError } from "../utils/errors"
4
+ import type { FluxStackConfig } from "@/core/config/schema"
5
+ import type { Logger } from "@/core/utils/logger"
6
+ import { FluxStackError } from "@/core/utils/errors"
7
7
  import { PluginDependencyManager } from "./dependency-manager"
8
8
  import { readdir, readFile } from "fs/promises"
9
9
  import { join, resolve } from "path"
@@ -291,7 +291,21 @@ export class PluginRegistry {
291
291
  }
292
292
  }
293
293
 
294
- // Try to import the plugin
294
+ // Install dependencies BEFORE importing the plugin
295
+ if (manifest && manifest.dependencies && Object.keys(manifest.dependencies).length > 0) {
296
+ try {
297
+ const resolution = await this.dependencyManager.resolvePluginDependencies(pluginPath)
298
+ if (resolution.dependencies.length > 0) {
299
+ // Install dependencies directly in the plugin directory
300
+ await this.dependencyManager.installPluginDependenciesLocally(pluginPath, resolution.dependencies)
301
+ this.logger?.debug(`Dependencies installed for plugin at: ${pluginPath}`)
302
+ }
303
+ } catch (error) {
304
+ this.logger?.warn(`Failed to install dependencies for plugin at '${pluginPath}'`, { error })
305
+ }
306
+ }
307
+
308
+ // Try to import the plugin (after dependencies are installed)
295
309
  const pluginModule = await import(resolve(pluginPath))
296
310
  const plugin: FluxStackPlugin = pluginModule.default || pluginModule
297
311
 
@@ -434,38 +448,28 @@ export class PluginRegistry {
434
448
  * Resolver dependências de todos os plugins descobertos
435
449
  */
436
450
  private async resolveDependencies(results: PluginLoadResult[]): Promise<void> {
437
- const resolutions = []
438
-
439
- // Resolver dependências para cada plugin carregado com sucesso
451
+ // Dependencies are now installed during plugin loading in loadPlugin()
452
+ // This method is kept for compatibility but no longer performs installation
453
+
454
+ // Only check for dependency conflicts on successfully loaded plugins
440
455
  for (const result of results) {
441
456
  if (result.success && result.plugin) {
442
457
  try {
443
- // Tentar encontrar o diretório do plugin
444
458
  const pluginDir = this.findPluginDirectory(result.plugin.name)
445
459
  if (pluginDir) {
446
460
  const resolution = await this.dependencyManager.resolvePluginDependencies(pluginDir)
447
- resolutions.push(resolution)
448
-
461
+
449
462
  if (!resolution.resolved) {
450
- this.logger?.warn(`Plugin '${result.plugin.name}' tem conflitos de dependências`, {
463
+ this.logger?.warn(`Plugin '${result.plugin.name}' has dependency conflicts`, {
451
464
  conflicts: resolution.conflicts.length
452
465
  })
453
466
  }
454
467
  }
455
468
  } catch (error) {
456
- this.logger?.warn(`Erro ao resolver dependências do plugin '${result.plugin.name}'`, { error })
469
+ this.logger?.warn(`Failed to check dependencies for plugin '${result.plugin.name}'`, { error })
457
470
  }
458
471
  }
459
472
  }
460
-
461
- // Instalar dependências se houver resoluções
462
- if (resolutions.length > 0) {
463
- try {
464
- await this.dependencyManager.installPluginDependencies(resolutions)
465
- } catch (error) {
466
- this.logger?.error('Erro ao instalar dependências de plugins', { error })
467
- }
468
- }
469
473
  }
470
474
 
471
475
  /**
@@ -1,5 +1,5 @@
1
- import type { FluxStackConfig } from "../config/schema"
2
- import type { Logger } from "../utils/logger/index"
1
+ import type { FluxStackConfig } from "@/core/config/schema"
2
+ import type { Logger } from "@/core/utils/logger/index"
3
3
 
4
4
  export type PluginHook =
5
5
  | 'setup'
@@ -96,11 +96,31 @@ export namespace FluxStack {
96
96
  onError?: (context: ErrorContext) => void | Promise<void>
97
97
  onBuild?: (context: BuildContext) => void | Promise<void>
98
98
  onBuildComplete?: (context: BuildContext) => void | Promise<void>
99
-
99
+
100
100
  // Configuration
101
+ /**
102
+ * @deprecated Use declarative config system instead (plugins/[name]/config/)
103
+ * Create a config/ folder with defineConfig() for type-safe configuration.
104
+ * This property is kept for backward compatibility with built-in plugins.
105
+ *
106
+ * @example
107
+ * // ✅ New way (recommended):
108
+ * // plugins/my-plugin/config/index.ts
109
+ * import { defineConfig, config } from '@/core/utils/config-schema'
110
+ * export const myConfig = defineConfig({ ... })
111
+ *
112
+ * // ❌ Old way (deprecated):
113
+ * configSchema: { type: 'object', properties: { ... } }
114
+ */
101
115
  configSchema?: PluginConfigSchema
116
+
117
+ /**
118
+ * @deprecated Use declarative config system with defineConfig()
119
+ * This property will be removed in a future major version.
120
+ * Use the config/ folder structure for automatic type inference.
121
+ */
102
122
  defaultConfig?: any
103
-
123
+
104
124
  // CLI commands
105
125
  commands?: CliCommand[]
106
126
  }
@@ -251,4 +271,126 @@ export interface CliContext {
251
271
  name: string
252
272
  version: string
253
273
  }
254
- }
274
+ }
275
+
276
+ // Live Components Types
277
+ export interface LiveComponent<TState = any> {
278
+ id: string
279
+ name: string
280
+ state: TState
281
+ mounted: boolean
282
+ socket?: any
283
+ userId?: string
284
+ destroy?: () => void
285
+ executeAction?: (action: string, payload?: any) => Promise<any>
286
+ setState?: (newState: Partial<TState>) => void
287
+ getSerializableState?: () => TState
288
+ }
289
+
290
+ export interface LiveMessage {
291
+ type: string
292
+ componentId: string
293
+ data?: any
294
+ payload?: any
295
+ action?: string
296
+ property?: string
297
+ userId?: string
298
+ expectResponse?: boolean
299
+ timestamp?: number
300
+ requestId?: string
301
+ room?: string
302
+ }
303
+
304
+ export interface BroadcastMessage {
305
+ type: string
306
+ data?: any
307
+ channel?: string
308
+ room?: string
309
+ payload?: any
310
+ excludeUser?: string
311
+ }
312
+
313
+ export interface ComponentDefinition<TState = any> {
314
+ name: string
315
+ initialState: TState
316
+ handlers?: Record<string, Function>
317
+ component?: any
318
+ }
319
+
320
+ export interface WebSocketData {
321
+ componentId?: string
322
+ userId?: string
323
+ sessionId?: string
324
+ }
325
+
326
+ // File Upload Types
327
+ export interface ActiveUpload {
328
+ uploadId: string
329
+ componentId?: string
330
+ filename: string
331
+ fileType?: string
332
+ fileSize?: number
333
+ totalChunks: number
334
+ receivedChunks: Map<number, any>
335
+ startTime: number
336
+ lastChunkTime?: number
337
+ }
338
+
339
+ export interface FileUploadStartMessage {
340
+ type: 'upload:start' | 'FILE_UPLOAD_START'
341
+ uploadId: string
342
+ filename: string
343
+ totalChunks: number
344
+ fileSize: number
345
+ componentId?: string
346
+ fileType?: string
347
+ chunkSize?: number
348
+ requestId?: string
349
+ }
350
+
351
+ export interface FileUploadChunkMessage {
352
+ type: 'upload:chunk' | 'FILE_UPLOAD_CHUNK'
353
+ uploadId: string
354
+ chunkIndex: number
355
+ data: string | ArrayBuffer
356
+ totalChunks?: number
357
+ componentId?: string
358
+ requestId?: string
359
+ }
360
+
361
+ export interface FileUploadCompleteMessage {
362
+ type: 'upload:complete' | 'FILE_UPLOAD_COMPLETE'
363
+ uploadId: string
364
+ requestId?: string
365
+ }
366
+
367
+ export interface FileUploadProgressResponse {
368
+ type: 'upload:progress' | 'FILE_UPLOAD_PROGRESS'
369
+ uploadId: string
370
+ receivedChunks?: number
371
+ totalChunks?: number
372
+ percentage?: number
373
+ componentId?: string
374
+ chunkIndex?: number
375
+ bytesUploaded?: number
376
+ totalBytes?: number
377
+ progress?: number
378
+ timestamp?: number
379
+ }
380
+
381
+ export interface FileUploadCompleteResponse {
382
+ type: 'upload:complete' | 'FILE_UPLOAD_COMPLETE'
383
+ uploadId: string
384
+ url?: string
385
+ filename?: string
386
+ size?: number
387
+ componentId?: string
388
+ success?: boolean
389
+ error?: string
390
+ message?: string
391
+ fileUrl?: string
392
+ timestamp?: number
393
+ }
394
+
395
+ // Plugin Type Export
396
+ export type Plugin = FluxStack.Plugin
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Backend Entry Point - Core Framework
3
+ *
4
+ * This file contains the protected logic for running backend standalone mode.
5
+ * DO NOT modify this file directly - it's part of the FluxStack framework core.
6
+ *
7
+ * For customization, use app/server/backend-only.ts
8
+ */
9
+
10
+ import type { Elysia } from "elysia"
11
+ import { startBackendOnly } from "./standalone"
12
+
13
+ export interface BackendEntryConfig {
14
+ port: number
15
+ apiPrefix?: string
16
+ host?: string
17
+ }
18
+
19
+ /**
20
+ * Start backend in standalone mode
21
+ *
22
+ * @param apiRoutes - Elysia routes from app/server/routes
23
+ * @param config - Backend configuration
24
+ */
25
+ export function startBackend(
26
+ apiRoutes: Elysia,
27
+ config: BackendEntryConfig
28
+ ) {
29
+ const { port, apiPrefix = '/api', host = 'localhost' } = config
30
+
31
+ console.log(`🚀 Backend standalone: ${host}:${port}`)
32
+ console.log(`📡 API Prefix: ${apiPrefix}`)
33
+ console.log()
34
+
35
+ // Start backend using the standalone utility
36
+ startBackendOnly(apiRoutes, { port, apiPrefix })
37
+ }
38
+
39
+ /**
40
+ * Create backend entry config from declarative config
41
+ * Helper to make it easy to use with the config system
42
+ */
43
+ export function createBackendConfig(
44
+ serverConfig: { server: { backendPort: number; apiPrefix: string; host: string } }
45
+ ): BackendEntryConfig {
46
+ return {
47
+ port: serverConfig.server.backendPort,
48
+ apiPrefix: serverConfig.server.apiPrefix,
49
+ host: serverConfig.server.host
50
+ }
51
+ }
@@ -65,7 +65,7 @@ export class FluxStackFramework {
65
65
  // Create plugin context
66
66
  this.pluginContext = {
67
67
  config: fullConfig,
68
- logger: logger as Logger,
68
+ logger: logger as any,
69
69
  app: this.app,
70
70
  utils: pluginUtils
71
71
  }
@@ -73,7 +73,7 @@ export class FluxStackFramework {
73
73
  // Initialize plugin manager
74
74
  this.pluginManager = new PluginManager({
75
75
  config: fullConfig,
76
- logger: logger as Logger,
76
+ logger: logger as any,
77
77
  app: this.app
78
78
  })
79
79
 
@@ -6,7 +6,7 @@ import type {
6
6
  BroadcastMessage,
7
7
  ComponentDefinition,
8
8
  WebSocketData
9
- } from '../../types/types'
9
+ } from '@/core/plugins/types'
10
10
  import { stateSignature, type SignedState } from './StateSignature'
11
11
  import { performanceMonitor } from './LiveComponentPerformanceMonitor'
12
12
 
@@ -151,7 +151,7 @@ export class ComponentRegistry {
151
151
  try {
152
152
  const fs = await import('fs')
153
153
  const path = await import('path')
154
- const { startGroup, endGroup, logInGroup, groupSummary } = await import('../../utils/logger/group-logger')
154
+ const { startGroup, endGroup, logInGroup, groupSummary } = await import('@/core/utils/logger/group-logger')
155
155
 
156
156
  if (!fs.existsSync(componentsPath)) {
157
157
  console.log(`⚠️ Components path not found: ${componentsPath}`)
@@ -159,15 +159,9 @@ export class ComponentRegistry {
159
159
  }
160
160
 
161
161
  const files = fs.readdirSync(componentsPath)
162
- let discoveredCount = 0
163
-
164
- startGroup({
165
- title: 'Live Components Auto-Discovery',
166
- icon: '🔍',
167
- color: 'blue',
168
- collapsed: true
169
- })
162
+ const components: string[] = []
170
163
 
164
+ // Discovery with component names collection
171
165
  for (const file of files) {
172
166
  if (file.endsWith('.ts') || file.endsWith('.js')) {
173
167
  try {
@@ -183,30 +177,19 @@ export class ComponentRegistry {
183
177
 
184
178
  const componentName = exportName.replace(/Component$/, '')
185
179
  this.registerComponentClass(componentName, exportedItem)
186
- logInGroup(`${componentName} (from ${file})`, '📦')
187
- discoveredCount++
180
+ components.push(componentName)
188
181
  }
189
182
  })
190
-
191
- // Check for integration hooks (like SystemMonitorIntegration)
192
- if (module.default && typeof module.default === 'object' && module.default.setupIntegration) {
193
- logInGroup('Integration hooks found', '🔗')
194
- }
195
183
  } catch (error) {
196
- logInGroup(`Failed to load ${file}`, '⚠️')
184
+ // Silent - only log in debug mode
197
185
  }
198
186
  }
199
187
  }
200
188
 
201
- if (discoveredCount > 0) {
202
- const label = discoveredCount === 1 ? 'component discovered' : 'components discovered'
203
- groupSummary(discoveredCount, label, '✓')
204
- } else {
205
- logInGroup('No components found', '⚠️')
189
+ // Display components in a compact single line format
190
+ if (components.length > 0) {
191
+ console.log(`\nLive Components (${components.length}): ${components.join(', ')}\n`)
206
192
  }
207
-
208
- endGroup()
209
- console.log('') // Separator line
210
193
  } catch (error) {
211
194
  console.error('❌ Auto-discovery failed:', error)
212
195
  }
@@ -8,7 +8,7 @@ import type {
8
8
  FileUploadCompleteMessage,
9
9
  FileUploadProgressResponse,
10
10
  FileUploadCompleteResponse
11
- } from '../../types/types'
11
+ } from '@/core/plugins/types'
12
12
 
13
13
  export class FileUploadManager {
14
14
  private activeUploads = new Map<string, ActiveUpload>()
@@ -0,0 +1,26 @@
1
+ // 🔥 Auto-generated Live Components Registration
2
+ // This file is automatically generated during build time - DO NOT EDIT MANUALLY
3
+ // Generated at: 2025-11-12T22:57:08.521Z
4
+
5
+ import { LiveClockComponent } from "@/app/server/live/LiveClockComponent"
6
+ import { componentRegistry } from "@/core/server/live/ComponentRegistry"
7
+
8
+ // Register all components statically for production bundle
9
+ function registerAllComponents() {
10
+ try {
11
+ // Auto-generated component registrations
12
+ componentRegistry.registerComponentClass('LiveClock', LiveClockComponent)
13
+
14
+ console.log('📝 Live components registered successfully! (1 components)')
15
+ } catch (error) {
16
+ console.warn('⚠️ Error registering components:', error)
17
+ }
18
+ }
19
+
20
+ // Auto-register components
21
+ registerAllComponents()
22
+
23
+ // Export all components to ensure they're included in the bundle
24
+ export {
25
+ LiveClockComponent
26
+ }