create-fluxstack 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/create-fluxstack.ts +2 -3
  2. package/package.json +1 -1
  3. package/.env +0 -30
  4. package/LICENSE +0 -21
  5. package/app/client/README.md +0 -69
  6. package/app/client/frontend-only.ts +0 -12
  7. package/app/client/index.html +0 -13
  8. package/app/client/public/vite.svg +0 -1
  9. package/app/client/src/App.css +0 -883
  10. package/app/client/src/App.tsx +0 -669
  11. package/app/client/src/assets/react.svg +0 -1
  12. package/app/client/src/components/TestPage.tsx +0 -453
  13. package/app/client/src/index.css +0 -51
  14. package/app/client/src/lib/eden-api.ts +0 -110
  15. package/app/client/src/main.tsx +0 -10
  16. package/app/client/src/vite-env.d.ts +0 -1
  17. package/app/client/tsconfig.app.json +0 -43
  18. package/app/client/tsconfig.json +0 -7
  19. package/app/client/tsconfig.node.json +0 -25
  20. package/app/server/app.ts +0 -10
  21. package/app/server/backend-only.ts +0 -15
  22. package/app/server/controllers/users.controller.ts +0 -69
  23. package/app/server/index.ts +0 -104
  24. package/app/server/routes/index.ts +0 -25
  25. package/app/server/routes/users.routes.ts +0 -121
  26. package/app/server/types/index.ts +0 -1
  27. package/app/shared/types/index.ts +0 -18
  28. package/bun.lock +0 -1053
  29. package/core/__tests__/integration.test.ts +0 -227
  30. package/core/build/index.ts +0 -186
  31. package/core/cli/command-registry.ts +0 -334
  32. package/core/cli/index.ts +0 -394
  33. package/core/cli/plugin-discovery.ts +0 -200
  34. package/core/client/standalone.ts +0 -57
  35. package/core/config/__tests__/config-loader.test.ts +0 -591
  36. package/core/config/__tests__/config-merger.test.ts +0 -657
  37. package/core/config/__tests__/env-converter.test.ts +0 -372
  38. package/core/config/__tests__/env-processor.test.ts +0 -431
  39. package/core/config/__tests__/env.test.ts +0 -452
  40. package/core/config/__tests__/integration.test.ts +0 -418
  41. package/core/config/__tests__/loader.test.ts +0 -331
  42. package/core/config/__tests__/schema.test.ts +0 -129
  43. package/core/config/__tests__/validator.test.ts +0 -318
  44. package/core/config/env-dynamic.ts +0 -326
  45. package/core/config/env.ts +0 -597
  46. package/core/config/index.ts +0 -317
  47. package/core/config/loader.ts +0 -546
  48. package/core/config/runtime-config.ts +0 -322
  49. package/core/config/schema.ts +0 -694
  50. package/core/config/validator.ts +0 -540
  51. package/core/framework/__tests__/server.test.ts +0 -233
  52. package/core/framework/client.ts +0 -132
  53. package/core/framework/index.ts +0 -8
  54. package/core/framework/server.ts +0 -501
  55. package/core/framework/types.ts +0 -63
  56. package/core/plugins/__tests__/built-in.test.ts.disabled +0 -366
  57. package/core/plugins/__tests__/manager.test.ts +0 -398
  58. package/core/plugins/__tests__/monitoring.test.ts +0 -401
  59. package/core/plugins/__tests__/registry.test.ts +0 -335
  60. package/core/plugins/built-in/index.ts +0 -142
  61. package/core/plugins/built-in/logger/index.ts +0 -180
  62. package/core/plugins/built-in/monitoring/README.md +0 -193
  63. package/core/plugins/built-in/monitoring/index.ts +0 -912
  64. package/core/plugins/built-in/static/index.ts +0 -289
  65. package/core/plugins/built-in/swagger/index.ts +0 -229
  66. package/core/plugins/built-in/vite/index.ts +0 -316
  67. package/core/plugins/config.ts +0 -348
  68. package/core/plugins/discovery.ts +0 -350
  69. package/core/plugins/executor.ts +0 -351
  70. package/core/plugins/index.ts +0 -195
  71. package/core/plugins/manager.ts +0 -583
  72. package/core/plugins/registry.ts +0 -424
  73. package/core/plugins/types.ts +0 -254
  74. package/core/server/framework.ts +0 -123
  75. package/core/server/index.ts +0 -8
  76. package/core/server/plugins/database.ts +0 -182
  77. package/core/server/plugins/logger.ts +0 -47
  78. package/core/server/plugins/swagger.ts +0 -34
  79. package/core/server/standalone.ts +0 -91
  80. package/core/templates/create-project.ts +0 -455
  81. package/core/types/api.ts +0 -169
  82. package/core/types/build.ts +0 -174
  83. package/core/types/config.ts +0 -68
  84. package/core/types/index.ts +0 -127
  85. package/core/types/plugin.ts +0 -94
  86. package/core/utils/__tests__/errors.test.ts +0 -139
  87. package/core/utils/__tests__/helpers.test.ts +0 -297
  88. package/core/utils/__tests__/logger.test.ts +0 -141
  89. package/core/utils/env-runtime-v2.ts +0 -232
  90. package/core/utils/env-runtime.ts +0 -252
  91. package/core/utils/errors/codes.ts +0 -115
  92. package/core/utils/errors/handlers.ts +0 -63
  93. package/core/utils/errors/index.ts +0 -81
  94. package/core/utils/helpers.ts +0 -180
  95. package/core/utils/index.ts +0 -18
  96. package/core/utils/logger/index.ts +0 -161
  97. package/core/utils/logger.ts +0 -106
  98. package/core/utils/monitoring/index.ts +0 -212
  99. package/tsconfig.json +0 -51
  100. package/vite.config.ts +0 -42
@@ -1,195 +0,0 @@
1
- /**
2
- * Enhanced Plugin System
3
- * Comprehensive plugin system with lifecycle hooks, dependency management, and configuration
4
- */
5
-
6
- // Core plugin types and interfaces
7
- export type {
8
- Plugin,
9
- PluginContext,
10
- PluginHook,
11
- PluginPriority,
12
- PluginManifest,
13
- PluginLoadResult,
14
- PluginRegistryState,
15
- PluginHookResult,
16
- PluginMetrics,
17
- PluginDiscoveryOptions,
18
- PluginInstallOptions,
19
- PluginExecutionContext,
20
- PluginValidationResult,
21
- HookExecutionOptions,
22
- PluginLifecycleEvent,
23
- PluginConfigSchema,
24
- RequestContext,
25
- ResponseContext,
26
- ErrorContext,
27
- BuildContext
28
- } from './types'
29
-
30
- // Plugin registry
31
- export { PluginRegistry } from './registry'
32
- export type { PluginRegistryConfig } from './registry'
33
-
34
- // Plugin discovery
35
- export { PluginDiscovery, pluginDiscovery } from './discovery'
36
- export type { PluginDiscoveryConfig } from './discovery'
37
-
38
- // Plugin configuration management
39
- export {
40
- DefaultPluginConfigManager,
41
- createPluginUtils
42
- } from './config'
43
- export type { PluginConfigManager } from './config'
44
-
45
- // Plugin manager
46
- export {
47
- PluginManager,
48
- createRequestContext,
49
- createResponseContext,
50
- createErrorContext,
51
- createBuildContext
52
- } from './manager'
53
- export type { PluginManagerConfig } from './manager'
54
-
55
- // Plugin executor
56
- export {
57
- PluginExecutor,
58
- calculateExecutionStats
59
- } from './executor'
60
- export type {
61
- PluginExecutionPlan,
62
- PluginExecutionStep,
63
- PluginExecutionStats
64
- } from './executor'
65
-
66
- // Utility functions for plugin development
67
- export const PluginUtils = {
68
- /**
69
- * Create a simple plugin
70
- */
71
- createPlugin: (config: {
72
- name: string
73
- version?: string
74
- description?: string
75
- dependencies?: string[]
76
- priority?: number | PluginPriority
77
- setup?: (context: PluginContext) => void | Promise<void>
78
- onServerStart?: (context: PluginContext) => void | Promise<void>
79
- onServerStop?: (context: PluginContext) => void | Promise<void>
80
- onRequest?: (context: RequestContext) => void | Promise<void>
81
- onResponse?: (context: ResponseContext) => void | Promise<void>
82
- onError?: (context: ErrorContext) => void | Promise<void>
83
- configSchema?: any
84
- defaultConfig?: any
85
- }): Plugin => {
86
- const plugin = {
87
- name: config.name,
88
- ...(config.version && { version: config.version }),
89
- ...(config.description && { description: config.description }),
90
- ...(config.dependencies && { dependencies: config.dependencies }),
91
- ...(config.priority !== undefined && { priority: config.priority }),
92
- ...(config.setup && { setup: config.setup }),
93
- ...(config.onServerStart && { onServerStart: config.onServerStart }),
94
- ...(config.onServerStop && { onServerStop: config.onServerStop }),
95
- ...(config.onRequest && { onRequest: config.onRequest }),
96
- ...(config.onResponse && { onResponse: config.onResponse }),
97
- ...(config.onError && { onError: config.onError }),
98
- ...(config.configSchema && { configSchema: config.configSchema }),
99
- ...(config.defaultConfig && { defaultConfig: config.defaultConfig })
100
- } as Plugin
101
- return plugin
102
- },
103
-
104
- /**
105
- * Create a plugin manifest
106
- */
107
- createManifest: (config: {
108
- name: string
109
- version: string
110
- description: string
111
- author: string
112
- license: string
113
- homepage?: string
114
- repository?: string
115
- keywords?: string[]
116
- dependencies?: Record<string, string>
117
- peerDependencies?: Record<string, string>
118
- fluxstack: {
119
- version: string
120
- hooks: PluginHook[]
121
- config?: any
122
- category?: string
123
- tags?: string[]
124
- }
125
- }): any => {
126
- return {
127
- name: config.name,
128
- version: config.version || '1.0.0',
129
- description: config.description,
130
- author: config.author,
131
- license: config.license,
132
- homepage: config.homepage,
133
- repository: config.repository,
134
- keywords: config.keywords || [],
135
- dependencies: config.dependencies || {},
136
- peerDependencies: config.peerDependencies,
137
- fluxstack: config.fluxstack
138
- }
139
- },
140
-
141
- /**
142
- * Validate plugin structure
143
- */
144
- validatePlugin: (plugin: any): plugin is Plugin => {
145
- return (
146
- plugin &&
147
- typeof plugin === 'object' &&
148
- typeof plugin.name === 'string' &&
149
- plugin.name.length > 0
150
- )
151
- },
152
-
153
- /**
154
- * Check if plugin implements hook
155
- */
156
- implementsHook: (plugin: Plugin, hook: PluginHook): boolean => {
157
- const hookFunction = (plugin as any)[hook]
158
- return hookFunction && typeof hookFunction === 'function'
159
- },
160
-
161
- /**
162
- * Get plugin hooks
163
- */
164
- getPluginHooks: (plugin: Plugin): PluginHook[] => {
165
- const hooks: PluginHook[] = []
166
- const possibleHooks: PluginHook[] = [
167
- 'setup',
168
- 'onServerStart',
169
- 'onServerStop',
170
- 'onRequest',
171
- 'onResponse',
172
- 'onError',
173
- 'onBuild',
174
- 'onBuildComplete'
175
- ]
176
-
177
- for (const hook of possibleHooks) {
178
- if (PluginUtils.implementsHook(plugin, hook)) {
179
- hooks.push(hook)
180
- }
181
- }
182
-
183
- return hooks
184
- }
185
- }
186
-
187
- // Re-export types for convenience
188
- import type {
189
- PluginContext,
190
- PluginHook,
191
- PluginPriority,
192
- RequestContext,
193
- ResponseContext,
194
- ErrorContext
195
- } from './types'