create-fluxstack 1.0.5 → 1.0.6

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 (406) hide show
  1. package/.claude/settings.local.json +2 -1
  2. package/create-fluxstack.ts +1 -0
  3. package/package.json +1 -1
  4. package/ENV_TESTING_REPORT.md +0 -292
  5. package/FRAMEWORK_ROADMAP.md +0 -183
  6. package/FRONTEND_TESTS_README.md +0 -287
  7. package/TEST_RESULTS.md +0 -130
  8. package/docs/dynamic-environment-variables.md +0 -380
  9. package/examples/dynamic-env-usage.ts +0 -283
  10. package/examples/hybrid-env-strategy.ts +0 -212
  11. package/examples/simplified-env-usage.ts +0 -251
  12. package/meu-app-teste/README.md +0 -44
  13. package/meu-app-teste/app/client/README.md +0 -69
  14. package/meu-app-teste/app/client/frontend-only.ts +0 -12
  15. package/meu-app-teste/app/client/index.html +0 -13
  16. package/meu-app-teste/app/client/public/vite.svg +0 -1
  17. package/meu-app-teste/app/client/src/App.css +0 -883
  18. package/meu-app-teste/app/client/src/App.tsx +0 -669
  19. package/meu-app-teste/app/client/src/assets/react.svg +0 -1
  20. package/meu-app-teste/app/client/src/components/TestPage.tsx +0 -453
  21. package/meu-app-teste/app/client/src/index.css +0 -51
  22. package/meu-app-teste/app/client/src/lib/eden-api.ts +0 -110
  23. package/meu-app-teste/app/client/src/main.tsx +0 -10
  24. package/meu-app-teste/app/client/src/vite-env.d.ts +0 -1
  25. package/meu-app-teste/app/client/tsconfig.app.json +0 -43
  26. package/meu-app-teste/app/client/tsconfig.json +0 -7
  27. package/meu-app-teste/app/client/tsconfig.node.json +0 -25
  28. package/meu-app-teste/app/server/app.ts +0 -10
  29. package/meu-app-teste/app/server/backend-only.ts +0 -15
  30. package/meu-app-teste/app/server/controllers/users.controller.ts +0 -69
  31. package/meu-app-teste/app/server/index.ts +0 -104
  32. package/meu-app-teste/app/server/routes/index.ts +0 -25
  33. package/meu-app-teste/app/server/routes/users.routes.ts +0 -121
  34. package/meu-app-teste/app/server/types/index.ts +0 -1
  35. package/meu-app-teste/app/shared/types/index.ts +0 -18
  36. package/meu-app-teste/bun.lock +0 -1053
  37. package/meu-app-teste/core/__tests__/integration.test.ts +0 -227
  38. package/meu-app-teste/core/build/index.ts +0 -186
  39. package/meu-app-teste/core/cli/command-registry.ts +0 -334
  40. package/meu-app-teste/core/cli/index.ts +0 -394
  41. package/meu-app-teste/core/cli/plugin-discovery.ts +0 -200
  42. package/meu-app-teste/core/client/standalone.ts +0 -57
  43. package/meu-app-teste/core/config/__tests__/config-loader.test.ts +0 -591
  44. package/meu-app-teste/core/config/__tests__/config-merger.test.ts +0 -657
  45. package/meu-app-teste/core/config/__tests__/env-converter.test.ts +0 -372
  46. package/meu-app-teste/core/config/__tests__/env-processor.test.ts +0 -431
  47. package/meu-app-teste/core/config/__tests__/env.test.ts +0 -452
  48. package/meu-app-teste/core/config/__tests__/integration.test.ts +0 -418
  49. package/meu-app-teste/core/config/__tests__/loader.test.ts +0 -331
  50. package/meu-app-teste/core/config/__tests__/schema.test.ts +0 -129
  51. package/meu-app-teste/core/config/__tests__/validator.test.ts +0 -318
  52. package/meu-app-teste/core/config/env-dynamic.ts +0 -326
  53. package/meu-app-teste/core/config/env.ts +0 -597
  54. package/meu-app-teste/core/config/index.ts +0 -317
  55. package/meu-app-teste/core/config/loader.ts +0 -546
  56. package/meu-app-teste/core/config/runtime-config.ts +0 -322
  57. package/meu-app-teste/core/config/schema.ts +0 -694
  58. package/meu-app-teste/core/config/validator.ts +0 -540
  59. package/meu-app-teste/core/framework/__tests__/server.test.ts +0 -233
  60. package/meu-app-teste/core/framework/client.ts +0 -132
  61. package/meu-app-teste/core/framework/index.ts +0 -8
  62. package/meu-app-teste/core/framework/server.ts +0 -501
  63. package/meu-app-teste/core/framework/types.ts +0 -63
  64. package/meu-app-teste/core/plugins/__tests__/built-in.test.ts.disabled +0 -366
  65. package/meu-app-teste/core/plugins/__tests__/manager.test.ts +0 -398
  66. package/meu-app-teste/core/plugins/__tests__/monitoring.test.ts +0 -401
  67. package/meu-app-teste/core/plugins/__tests__/registry.test.ts +0 -335
  68. package/meu-app-teste/core/plugins/built-in/index.ts +0 -142
  69. package/meu-app-teste/core/plugins/built-in/logger/index.ts +0 -180
  70. package/meu-app-teste/core/plugins/built-in/monitoring/README.md +0 -193
  71. package/meu-app-teste/core/plugins/built-in/monitoring/index.ts +0 -912
  72. package/meu-app-teste/core/plugins/built-in/static/index.ts +0 -289
  73. package/meu-app-teste/core/plugins/built-in/swagger/index.ts +0 -229
  74. package/meu-app-teste/core/plugins/built-in/vite/index.ts +0 -316
  75. package/meu-app-teste/core/plugins/config.ts +0 -348
  76. package/meu-app-teste/core/plugins/discovery.ts +0 -350
  77. package/meu-app-teste/core/plugins/executor.ts +0 -351
  78. package/meu-app-teste/core/plugins/index.ts +0 -195
  79. package/meu-app-teste/core/plugins/manager.ts +0 -583
  80. package/meu-app-teste/core/plugins/registry.ts +0 -424
  81. package/meu-app-teste/core/plugins/types.ts +0 -254
  82. package/meu-app-teste/core/server/framework.ts +0 -123
  83. package/meu-app-teste/core/server/index.ts +0 -8
  84. package/meu-app-teste/core/server/plugins/database.ts +0 -182
  85. package/meu-app-teste/core/server/plugins/logger.ts +0 -47
  86. package/meu-app-teste/core/server/plugins/swagger.ts +0 -34
  87. package/meu-app-teste/core/server/standalone.ts +0 -91
  88. package/meu-app-teste/core/templates/create-project.ts +0 -455
  89. package/meu-app-teste/core/types/api.ts +0 -169
  90. package/meu-app-teste/core/types/build.ts +0 -174
  91. package/meu-app-teste/core/types/config.ts +0 -68
  92. package/meu-app-teste/core/types/index.ts +0 -127
  93. package/meu-app-teste/core/types/plugin.ts +0 -94
  94. package/meu-app-teste/core/utils/__tests__/errors.test.ts +0 -139
  95. package/meu-app-teste/core/utils/__tests__/helpers.test.ts +0 -297
  96. package/meu-app-teste/core/utils/__tests__/logger.test.ts +0 -141
  97. package/meu-app-teste/core/utils/env-runtime-v2.ts +0 -232
  98. package/meu-app-teste/core/utils/env-runtime.ts +0 -252
  99. package/meu-app-teste/core/utils/errors/codes.ts +0 -115
  100. package/meu-app-teste/core/utils/errors/handlers.ts +0 -63
  101. package/meu-app-teste/core/utils/errors/index.ts +0 -81
  102. package/meu-app-teste/core/utils/helpers.ts +0 -180
  103. package/meu-app-teste/core/utils/index.ts +0 -18
  104. package/meu-app-teste/core/utils/logger/index.ts +0 -161
  105. package/meu-app-teste/core/utils/logger.ts +0 -106
  106. package/meu-app-teste/core/utils/monitoring/index.ts +0 -212
  107. package/meu-app-teste/package.json +0 -92
  108. package/meu-app-teste/tsconfig.json +0 -51
  109. package/meu-app-teste/vite.config.ts +0 -42
  110. package/my-final-test/README.md +0 -44
  111. package/my-final-test/app/client/README.md +0 -69
  112. package/my-final-test/app/client/frontend-only.ts +0 -12
  113. package/my-final-test/app/client/index.html +0 -13
  114. package/my-final-test/app/client/public/vite.svg +0 -1
  115. package/my-final-test/app/client/src/App.css +0 -883
  116. package/my-final-test/app/client/src/App.tsx +0 -669
  117. package/my-final-test/app/client/src/assets/react.svg +0 -1
  118. package/my-final-test/app/client/src/components/TestPage.tsx +0 -453
  119. package/my-final-test/app/client/src/index.css +0 -51
  120. package/my-final-test/app/client/src/lib/eden-api.ts +0 -110
  121. package/my-final-test/app/client/src/main.tsx +0 -10
  122. package/my-final-test/app/client/src/vite-env.d.ts +0 -1
  123. package/my-final-test/app/client/tsconfig.app.json +0 -43
  124. package/my-final-test/app/client/tsconfig.json +0 -7
  125. package/my-final-test/app/client/tsconfig.node.json +0 -25
  126. package/my-final-test/app/server/app.ts +0 -10
  127. package/my-final-test/app/server/backend-only.ts +0 -15
  128. package/my-final-test/app/server/controllers/users.controller.ts +0 -69
  129. package/my-final-test/app/server/index.ts +0 -104
  130. package/my-final-test/app/server/routes/index.ts +0 -25
  131. package/my-final-test/app/server/routes/users.routes.ts +0 -121
  132. package/my-final-test/app/server/types/index.ts +0 -1
  133. package/my-final-test/app/shared/types/index.ts +0 -18
  134. package/my-final-test/bun.lock +0 -993
  135. package/my-final-test/core/__tests__/integration.test.ts +0 -227
  136. package/my-final-test/core/build/index.ts +0 -186
  137. package/my-final-test/core/cli/command-registry.ts +0 -334
  138. package/my-final-test/core/cli/index.ts +0 -394
  139. package/my-final-test/core/cli/plugin-discovery.ts +0 -200
  140. package/my-final-test/core/client/standalone.ts +0 -57
  141. package/my-final-test/core/config/__tests__/config-loader.test.ts +0 -591
  142. package/my-final-test/core/config/__tests__/config-merger.test.ts +0 -657
  143. package/my-final-test/core/config/__tests__/env-converter.test.ts +0 -372
  144. package/my-final-test/core/config/__tests__/env-processor.test.ts +0 -431
  145. package/my-final-test/core/config/__tests__/env.test.ts +0 -452
  146. package/my-final-test/core/config/__tests__/integration.test.ts +0 -418
  147. package/my-final-test/core/config/__tests__/loader.test.ts +0 -331
  148. package/my-final-test/core/config/__tests__/schema.test.ts +0 -129
  149. package/my-final-test/core/config/__tests__/validator.test.ts +0 -318
  150. package/my-final-test/core/config/env-dynamic.ts +0 -326
  151. package/my-final-test/core/config/env.ts +0 -597
  152. package/my-final-test/core/config/index.ts +0 -317
  153. package/my-final-test/core/config/loader.ts +0 -546
  154. package/my-final-test/core/config/runtime-config.ts +0 -322
  155. package/my-final-test/core/config/schema.ts +0 -694
  156. package/my-final-test/core/config/validator.ts +0 -540
  157. package/my-final-test/core/framework/__tests__/server.test.ts +0 -233
  158. package/my-final-test/core/framework/client.ts +0 -132
  159. package/my-final-test/core/framework/index.ts +0 -8
  160. package/my-final-test/core/framework/server.ts +0 -501
  161. package/my-final-test/core/framework/types.ts +0 -63
  162. package/my-final-test/core/plugins/__tests__/built-in.test.ts.disabled +0 -366
  163. package/my-final-test/core/plugins/__tests__/manager.test.ts +0 -398
  164. package/my-final-test/core/plugins/__tests__/monitoring.test.ts +0 -401
  165. package/my-final-test/core/plugins/__tests__/registry.test.ts +0 -335
  166. package/my-final-test/core/plugins/built-in/index.ts +0 -142
  167. package/my-final-test/core/plugins/built-in/logger/index.ts +0 -180
  168. package/my-final-test/core/plugins/built-in/monitoring/README.md +0 -193
  169. package/my-final-test/core/plugins/built-in/monitoring/index.ts +0 -912
  170. package/my-final-test/core/plugins/built-in/static/index.ts +0 -289
  171. package/my-final-test/core/plugins/built-in/swagger/index.ts +0 -229
  172. package/my-final-test/core/plugins/built-in/vite/index.ts +0 -316
  173. package/my-final-test/core/plugins/config.ts +0 -348
  174. package/my-final-test/core/plugins/discovery.ts +0 -350
  175. package/my-final-test/core/plugins/executor.ts +0 -351
  176. package/my-final-test/core/plugins/index.ts +0 -195
  177. package/my-final-test/core/plugins/manager.ts +0 -583
  178. package/my-final-test/core/plugins/registry.ts +0 -424
  179. package/my-final-test/core/plugins/types.ts +0 -254
  180. package/my-final-test/core/server/framework.ts +0 -123
  181. package/my-final-test/core/server/index.ts +0 -8
  182. package/my-final-test/core/server/plugins/database.ts +0 -182
  183. package/my-final-test/core/server/plugins/logger.ts +0 -47
  184. package/my-final-test/core/server/plugins/swagger.ts +0 -34
  185. package/my-final-test/core/server/standalone.ts +0 -91
  186. package/my-final-test/core/templates/create-project.ts +0 -455
  187. package/my-final-test/core/types/api.ts +0 -169
  188. package/my-final-test/core/types/build.ts +0 -174
  189. package/my-final-test/core/types/config.ts +0 -68
  190. package/my-final-test/core/types/index.ts +0 -127
  191. package/my-final-test/core/types/plugin.ts +0 -94
  192. package/my-final-test/core/utils/__tests__/errors.test.ts +0 -139
  193. package/my-final-test/core/utils/__tests__/helpers.test.ts +0 -297
  194. package/my-final-test/core/utils/__tests__/logger.test.ts +0 -141
  195. package/my-final-test/core/utils/env-runtime-v2.ts +0 -232
  196. package/my-final-test/core/utils/env-runtime.ts +0 -252
  197. package/my-final-test/core/utils/errors/codes.ts +0 -115
  198. package/my-final-test/core/utils/errors/handlers.ts +0 -63
  199. package/my-final-test/core/utils/errors/index.ts +0 -81
  200. package/my-final-test/core/utils/helpers.ts +0 -180
  201. package/my-final-test/core/utils/index.ts +0 -18
  202. package/my-final-test/core/utils/logger/index.ts +0 -161
  203. package/my-final-test/core/utils/logger.ts +0 -106
  204. package/my-final-test/core/utils/monitoring/index.ts +0 -212
  205. package/my-final-test/package.json +0 -68
  206. package/my-final-test/tsconfig.json +0 -51
  207. package/my-final-test/vite.config.ts +0 -42
  208. package/publish-setup.md +0 -111
  209. package/teste-corrigido/README.md +0 -44
  210. package/teste-corrigido/app/client/README.md +0 -69
  211. package/teste-corrigido/app/client/frontend-only.ts +0 -12
  212. package/teste-corrigido/app/client/index.html +0 -13
  213. package/teste-corrigido/app/client/public/vite.svg +0 -1
  214. package/teste-corrigido/app/client/src/App.css +0 -883
  215. package/teste-corrigido/app/client/src/App.tsx +0 -669
  216. package/teste-corrigido/app/client/src/assets/react.svg +0 -1
  217. package/teste-corrigido/app/client/src/components/TestPage.tsx +0 -453
  218. package/teste-corrigido/app/client/src/index.css +0 -51
  219. package/teste-corrigido/app/client/src/lib/eden-api.ts +0 -110
  220. package/teste-corrigido/app/client/src/main.tsx +0 -10
  221. package/teste-corrigido/app/client/src/vite-env.d.ts +0 -1
  222. package/teste-corrigido/app/client/tsconfig.app.json +0 -43
  223. package/teste-corrigido/app/client/tsconfig.json +0 -7
  224. package/teste-corrigido/app/client/tsconfig.node.json +0 -25
  225. package/teste-corrigido/app/server/app.ts +0 -10
  226. package/teste-corrigido/app/server/backend-only.ts +0 -15
  227. package/teste-corrigido/app/server/controllers/users.controller.ts +0 -69
  228. package/teste-corrigido/app/server/index.ts +0 -104
  229. package/teste-corrigido/app/server/routes/index.ts +0 -25
  230. package/teste-corrigido/app/server/routes/users.routes.ts +0 -121
  231. package/teste-corrigido/app/server/types/index.ts +0 -1
  232. package/teste-corrigido/app/shared/types/index.ts +0 -18
  233. package/teste-corrigido/bun.lock +0 -1053
  234. package/teste-corrigido/core/__tests__/integration.test.ts +0 -227
  235. package/teste-corrigido/core/build/index.ts +0 -186
  236. package/teste-corrigido/core/cli/command-registry.ts +0 -334
  237. package/teste-corrigido/core/cli/index.ts +0 -394
  238. package/teste-corrigido/core/cli/plugin-discovery.ts +0 -200
  239. package/teste-corrigido/core/client/standalone.ts +0 -57
  240. package/teste-corrigido/core/config/__tests__/config-loader.test.ts +0 -591
  241. package/teste-corrigido/core/config/__tests__/config-merger.test.ts +0 -657
  242. package/teste-corrigido/core/config/__tests__/env-converter.test.ts +0 -372
  243. package/teste-corrigido/core/config/__tests__/env-processor.test.ts +0 -431
  244. package/teste-corrigido/core/config/__tests__/env.test.ts +0 -452
  245. package/teste-corrigido/core/config/__tests__/integration.test.ts +0 -418
  246. package/teste-corrigido/core/config/__tests__/loader.test.ts +0 -331
  247. package/teste-corrigido/core/config/__tests__/schema.test.ts +0 -129
  248. package/teste-corrigido/core/config/__tests__/validator.test.ts +0 -318
  249. package/teste-corrigido/core/config/env-dynamic.ts +0 -326
  250. package/teste-corrigido/core/config/env.ts +0 -597
  251. package/teste-corrigido/core/config/index.ts +0 -317
  252. package/teste-corrigido/core/config/loader.ts +0 -546
  253. package/teste-corrigido/core/config/runtime-config.ts +0 -322
  254. package/teste-corrigido/core/config/schema.ts +0 -694
  255. package/teste-corrigido/core/config/validator.ts +0 -540
  256. package/teste-corrigido/core/framework/__tests__/server.test.ts +0 -233
  257. package/teste-corrigido/core/framework/client.ts +0 -132
  258. package/teste-corrigido/core/framework/index.ts +0 -8
  259. package/teste-corrigido/core/framework/server.ts +0 -501
  260. package/teste-corrigido/core/framework/types.ts +0 -63
  261. package/teste-corrigido/core/plugins/__tests__/built-in.test.ts.disabled +0 -366
  262. package/teste-corrigido/core/plugins/__tests__/manager.test.ts +0 -398
  263. package/teste-corrigido/core/plugins/__tests__/monitoring.test.ts +0 -401
  264. package/teste-corrigido/core/plugins/__tests__/registry.test.ts +0 -335
  265. package/teste-corrigido/core/plugins/built-in/index.ts +0 -142
  266. package/teste-corrigido/core/plugins/built-in/logger/index.ts +0 -180
  267. package/teste-corrigido/core/plugins/built-in/monitoring/README.md +0 -193
  268. package/teste-corrigido/core/plugins/built-in/monitoring/index.ts +0 -912
  269. package/teste-corrigido/core/plugins/built-in/static/index.ts +0 -289
  270. package/teste-corrigido/core/plugins/built-in/swagger/index.ts +0 -229
  271. package/teste-corrigido/core/plugins/built-in/vite/index.ts +0 -316
  272. package/teste-corrigido/core/plugins/config.ts +0 -348
  273. package/teste-corrigido/core/plugins/discovery.ts +0 -350
  274. package/teste-corrigido/core/plugins/executor.ts +0 -351
  275. package/teste-corrigido/core/plugins/index.ts +0 -195
  276. package/teste-corrigido/core/plugins/manager.ts +0 -583
  277. package/teste-corrigido/core/plugins/registry.ts +0 -424
  278. package/teste-corrigido/core/plugins/types.ts +0 -254
  279. package/teste-corrigido/core/server/framework.ts +0 -123
  280. package/teste-corrigido/core/server/index.ts +0 -8
  281. package/teste-corrigido/core/server/plugins/database.ts +0 -182
  282. package/teste-corrigido/core/server/plugins/logger.ts +0 -47
  283. package/teste-corrigido/core/server/plugins/swagger.ts +0 -34
  284. package/teste-corrigido/core/server/standalone.ts +0 -91
  285. package/teste-corrigido/core/templates/create-project.ts +0 -455
  286. package/teste-corrigido/core/types/api.ts +0 -169
  287. package/teste-corrigido/core/types/build.ts +0 -174
  288. package/teste-corrigido/core/types/config.ts +0 -68
  289. package/teste-corrigido/core/types/index.ts +0 -127
  290. package/teste-corrigido/core/types/plugin.ts +0 -94
  291. package/teste-corrigido/core/utils/__tests__/errors.test.ts +0 -139
  292. package/teste-corrigido/core/utils/__tests__/helpers.test.ts +0 -297
  293. package/teste-corrigido/core/utils/__tests__/logger.test.ts +0 -141
  294. package/teste-corrigido/core/utils/env-runtime-v2.ts +0 -232
  295. package/teste-corrigido/core/utils/env-runtime.ts +0 -252
  296. package/teste-corrigido/core/utils/errors/codes.ts +0 -115
  297. package/teste-corrigido/core/utils/errors/handlers.ts +0 -63
  298. package/teste-corrigido/core/utils/errors/index.ts +0 -81
  299. package/teste-corrigido/core/utils/helpers.ts +0 -180
  300. package/teste-corrigido/core/utils/index.ts +0 -18
  301. package/teste-corrigido/core/utils/logger/index.ts +0 -161
  302. package/teste-corrigido/core/utils/logger.ts +0 -106
  303. package/teste-corrigido/core/utils/monitoring/index.ts +0 -212
  304. package/teste-corrigido/package-template.json +0 -51
  305. package/teste-corrigido/package.json +0 -51
  306. package/teste-corrigido/tsconfig.json +0 -51
  307. package/teste-corrigido/vite.config.ts +0 -42
  308. package/teste-final-npm/README.md +0 -44
  309. package/teste-final-npm/app/client/README.md +0 -69
  310. package/teste-final-npm/app/client/frontend-only.ts +0 -12
  311. package/teste-final-npm/app/client/index.html +0 -13
  312. package/teste-final-npm/app/client/public/vite.svg +0 -1
  313. package/teste-final-npm/app/client/src/App.css +0 -883
  314. package/teste-final-npm/app/client/src/App.tsx +0 -669
  315. package/teste-final-npm/app/client/src/assets/react.svg +0 -1
  316. package/teste-final-npm/app/client/src/components/TestPage.tsx +0 -453
  317. package/teste-final-npm/app/client/src/index.css +0 -51
  318. package/teste-final-npm/app/client/src/lib/eden-api.ts +0 -110
  319. package/teste-final-npm/app/client/src/main.tsx +0 -10
  320. package/teste-final-npm/app/client/src/vite-env.d.ts +0 -1
  321. package/teste-final-npm/app/client/tsconfig.app.json +0 -43
  322. package/teste-final-npm/app/client/tsconfig.json +0 -7
  323. package/teste-final-npm/app/client/tsconfig.node.json +0 -25
  324. package/teste-final-npm/app/server/app.ts +0 -10
  325. package/teste-final-npm/app/server/backend-only.ts +0 -15
  326. package/teste-final-npm/app/server/controllers/users.controller.ts +0 -69
  327. package/teste-final-npm/app/server/index.ts +0 -104
  328. package/teste-final-npm/app/server/routes/index.ts +0 -25
  329. package/teste-final-npm/app/server/routes/users.routes.ts +0 -121
  330. package/teste-final-npm/app/server/types/index.ts +0 -1
  331. package/teste-final-npm/app/shared/types/index.ts +0 -18
  332. package/teste-final-npm/bun.lock +0 -1053
  333. package/teste-final-npm/core/__tests__/integration.test.ts +0 -227
  334. package/teste-final-npm/core/build/index.ts +0 -186
  335. package/teste-final-npm/core/cli/command-registry.ts +0 -334
  336. package/teste-final-npm/core/cli/index.ts +0 -394
  337. package/teste-final-npm/core/cli/plugin-discovery.ts +0 -200
  338. package/teste-final-npm/core/client/standalone.ts +0 -57
  339. package/teste-final-npm/core/config/__tests__/config-loader.test.ts +0 -591
  340. package/teste-final-npm/core/config/__tests__/config-merger.test.ts +0 -657
  341. package/teste-final-npm/core/config/__tests__/env-converter.test.ts +0 -372
  342. package/teste-final-npm/core/config/__tests__/env-processor.test.ts +0 -431
  343. package/teste-final-npm/core/config/__tests__/env.test.ts +0 -452
  344. package/teste-final-npm/core/config/__tests__/integration.test.ts +0 -418
  345. package/teste-final-npm/core/config/__tests__/loader.test.ts +0 -331
  346. package/teste-final-npm/core/config/__tests__/schema.test.ts +0 -129
  347. package/teste-final-npm/core/config/__tests__/validator.test.ts +0 -318
  348. package/teste-final-npm/core/config/env-dynamic.ts +0 -326
  349. package/teste-final-npm/core/config/env.ts +0 -597
  350. package/teste-final-npm/core/config/index.ts +0 -317
  351. package/teste-final-npm/core/config/loader.ts +0 -546
  352. package/teste-final-npm/core/config/runtime-config.ts +0 -322
  353. package/teste-final-npm/core/config/schema.ts +0 -694
  354. package/teste-final-npm/core/config/validator.ts +0 -540
  355. package/teste-final-npm/core/framework/__tests__/server.test.ts +0 -233
  356. package/teste-final-npm/core/framework/client.ts +0 -132
  357. package/teste-final-npm/core/framework/index.ts +0 -8
  358. package/teste-final-npm/core/framework/server.ts +0 -501
  359. package/teste-final-npm/core/framework/types.ts +0 -63
  360. package/teste-final-npm/core/plugins/__tests__/built-in.test.ts.disabled +0 -366
  361. package/teste-final-npm/core/plugins/__tests__/manager.test.ts +0 -398
  362. package/teste-final-npm/core/plugins/__tests__/monitoring.test.ts +0 -401
  363. package/teste-final-npm/core/plugins/__tests__/registry.test.ts +0 -335
  364. package/teste-final-npm/core/plugins/built-in/index.ts +0 -142
  365. package/teste-final-npm/core/plugins/built-in/logger/index.ts +0 -180
  366. package/teste-final-npm/core/plugins/built-in/monitoring/README.md +0 -193
  367. package/teste-final-npm/core/plugins/built-in/monitoring/index.ts +0 -912
  368. package/teste-final-npm/core/plugins/built-in/static/index.ts +0 -289
  369. package/teste-final-npm/core/plugins/built-in/swagger/index.ts +0 -229
  370. package/teste-final-npm/core/plugins/built-in/vite/index.ts +0 -316
  371. package/teste-final-npm/core/plugins/config.ts +0 -348
  372. package/teste-final-npm/core/plugins/discovery.ts +0 -350
  373. package/teste-final-npm/core/plugins/executor.ts +0 -351
  374. package/teste-final-npm/core/plugins/index.ts +0 -195
  375. package/teste-final-npm/core/plugins/manager.ts +0 -583
  376. package/teste-final-npm/core/plugins/registry.ts +0 -424
  377. package/teste-final-npm/core/plugins/types.ts +0 -254
  378. package/teste-final-npm/core/server/framework.ts +0 -123
  379. package/teste-final-npm/core/server/index.ts +0 -8
  380. package/teste-final-npm/core/server/plugins/database.ts +0 -182
  381. package/teste-final-npm/core/server/plugins/logger.ts +0 -47
  382. package/teste-final-npm/core/server/plugins/swagger.ts +0 -34
  383. package/teste-final-npm/core/server/standalone.ts +0 -91
  384. package/teste-final-npm/core/templates/create-project.ts +0 -455
  385. package/teste-final-npm/core/types/api.ts +0 -169
  386. package/teste-final-npm/core/types/build.ts +0 -174
  387. package/teste-final-npm/core/types/config.ts +0 -68
  388. package/teste-final-npm/core/types/index.ts +0 -127
  389. package/teste-final-npm/core/types/plugin.ts +0 -94
  390. package/teste-final-npm/core/utils/__tests__/errors.test.ts +0 -139
  391. package/teste-final-npm/core/utils/__tests__/helpers.test.ts +0 -297
  392. package/teste-final-npm/core/utils/__tests__/logger.test.ts +0 -141
  393. package/teste-final-npm/core/utils/env-runtime-v2.ts +0 -232
  394. package/teste-final-npm/core/utils/env-runtime.ts +0 -252
  395. package/teste-final-npm/core/utils/errors/codes.ts +0 -115
  396. package/teste-final-npm/core/utils/errors/handlers.ts +0 -63
  397. package/teste-final-npm/core/utils/errors/index.ts +0 -81
  398. package/teste-final-npm/core/utils/helpers.ts +0 -180
  399. package/teste-final-npm/core/utils/index.ts +0 -18
  400. package/teste-final-npm/core/utils/logger/index.ts +0 -161
  401. package/teste-final-npm/core/utils/logger.ts +0 -106
  402. package/teste-final-npm/core/utils/monitoring/index.ts +0 -212
  403. package/teste-final-npm/package-template.json +0 -51
  404. package/teste-final-npm/package.json +0 -51
  405. package/teste-final-npm/tsconfig.json +0 -51
  406. package/teste-final-npm/vite.config.ts +0 -42
@@ -1,289 +0,0 @@
1
- import { join, extname } from "path"
2
- import { existsSync, statSync } from "fs"
3
- import type { Plugin, PluginContext } from "../../types"
4
-
5
- export const staticPlugin: Plugin = {
6
- name: "static",
7
- version: "1.0.0",
8
- description: "Enhanced static file serving plugin for FluxStack with caching and compression",
9
- author: "FluxStack Team",
10
- priority: "low", // Should run after other plugins
11
- category: "core",
12
- tags: ["static", "files", "spa"],
13
- dependencies: [], // No hard dependencies, but works with vite plugin
14
-
15
- configSchema: {
16
- type: "object",
17
- properties: {
18
- enabled: {
19
- type: "boolean",
20
- description: "Enable static file serving"
21
- },
22
- publicDir: {
23
- type: "string",
24
- description: "Public directory for static files"
25
- },
26
- distDir: {
27
- type: "string",
28
- description: "Distribution directory for built files"
29
- },
30
- indexFile: {
31
- type: "string",
32
- description: "Index file for SPA routing"
33
- },
34
- cacheControl: {
35
- type: "object",
36
- properties: {
37
- enabled: { type: "boolean" },
38
- maxAge: { type: "number" },
39
- immutable: { type: "boolean" }
40
- },
41
- description: "Cache control settings"
42
- },
43
- compression: {
44
- type: "object",
45
- properties: {
46
- enabled: { type: "boolean" },
47
- types: {
48
- type: "array",
49
- items: { type: "string" }
50
- }
51
- },
52
- description: "Compression settings"
53
- },
54
- spa: {
55
- type: "object",
56
- properties: {
57
- enabled: { type: "boolean" },
58
- fallback: { type: "string" }
59
- },
60
- description: "Single Page Application settings"
61
- },
62
- excludePaths: {
63
- type: "array",
64
- items: { type: "string" },
65
- description: "Paths to exclude from static serving"
66
- }
67
- },
68
- additionalProperties: false
69
- },
70
-
71
- defaultConfig: {
72
- enabled: true,
73
- publicDir: "public",
74
- distDir: "dist/client",
75
- indexFile: "index.html",
76
- cacheControl: {
77
- enabled: true,
78
- maxAge: 31536000, // 1 year for assets
79
- immutable: true
80
- },
81
- compression: {
82
- enabled: true,
83
- types: [".js", ".css", ".html", ".json", ".svg"]
84
- },
85
- spa: {
86
- enabled: true,
87
- fallback: "index.html"
88
- },
89
- excludePaths: []
90
- },
91
-
92
- setup: async (context: PluginContext) => {
93
- const config = getPluginConfig(context)
94
-
95
- if (!config.enabled) {
96
- context.logger.info('Static files plugin disabled by configuration')
97
- return
98
- }
99
-
100
- context.logger.info("Enhanced static files plugin activated", {
101
- publicDir: config.publicDir,
102
- distDir: config.distDir,
103
- spa: config.spa.enabled,
104
- compression: config.compression.enabled
105
- })
106
-
107
- // Setup static file handling in Elysia
108
- context.app.get("/*", async ({ request, set }: { request: Request, set: any }) => {
109
- const url = new URL(request.url)
110
-
111
- // Skip API routes
112
- if (url.pathname.startsWith(context.config.server.apiPrefix)) {
113
- return
114
- }
115
-
116
- // Skip excluded paths
117
- if (config.excludePaths.some((path: string) => url.pathname.startsWith(path))) {
118
- return
119
- }
120
-
121
- try {
122
- // Note: Vite proxy is now handled by the Vite plugin via onBeforeRoute hook
123
- // This plugin only handles static files serving in production or fallback
124
-
125
- // Serve static files
126
- return await serveStaticFile(url.pathname, config, context, set)
127
-
128
- } catch (error) {
129
- context.logger.error("Error serving static file", {
130
- path: url.pathname,
131
- error: error instanceof Error ? error.message : String(error)
132
- })
133
-
134
- set.status = 500
135
- return "Internal Server Error"
136
- }
137
- })
138
- },
139
-
140
- onServerStart: async (context: PluginContext) => {
141
- const config = getPluginConfig(context)
142
-
143
- if (config.enabled) {
144
- const mode = context.utils.isDevelopment() ? 'development' : 'production'
145
- context.logger.info(`Static files plugin ready in ${mode} mode`, {
146
- publicDir: config.publicDir,
147
- distDir: config.distDir,
148
- spa: config.spa.enabled
149
- })
150
- }
151
- }
152
- }
153
-
154
- // Helper function to get plugin config
155
- function getPluginConfig(context: PluginContext) {
156
- const pluginConfig = context.config.plugins.config?.static || {}
157
- return { ...staticPlugin.defaultConfig, ...pluginConfig }
158
- }
159
-
160
- // Serve static file
161
- async function serveStaticFile(
162
- pathname: string,
163
- config: any,
164
- context: PluginContext,
165
- set: any
166
- ): Promise<any> {
167
- const isDev = context.utils.isDevelopment()
168
-
169
- // Determine base directory using path discovery (no hardcoded detection)
170
- let baseDir: string
171
-
172
- if (isDev && existsSync(config.publicDir)) {
173
- // Development: use public directory
174
- baseDir = config.publicDir
175
- } else {
176
- // Production: try paths in order of preference
177
- if (existsSync('client')) {
178
- // Found client/ in current directory (running from dist/)
179
- baseDir = 'client'
180
- } else if (existsSync('dist/client')) {
181
- // Found dist/client/ (running from project root)
182
- baseDir = 'dist/client'
183
- } else {
184
- // Fallback to configured path
185
- baseDir = config.distDir
186
- }
187
- }
188
-
189
- if (!existsSync(baseDir)) {
190
- context.logger.warn(`Static directory not found: ${baseDir}`)
191
- set.status = 404
192
- return "Not Found"
193
- }
194
-
195
- // Clean pathname
196
- const cleanPath = pathname === '/' ? `/${config.indexFile}` : pathname
197
- const filePath = join(process.cwd(), baseDir, cleanPath)
198
-
199
- // Security check - prevent directory traversal
200
- const resolvedPath = join(process.cwd(), baseDir)
201
- if (!filePath.startsWith(resolvedPath)) {
202
- set.status = 403
203
- return "Forbidden"
204
- }
205
-
206
- // Check if file exists
207
- if (!existsSync(filePath)) {
208
- // For SPA, serve index.html for non-file routes
209
- if (config.spa.enabled && !pathname.includes('.')) {
210
- const indexPath = join(process.cwd(), baseDir, config.spa.fallback)
211
- if (existsSync(indexPath)) {
212
- return serveFile(indexPath, config, set, context)
213
- }
214
- }
215
-
216
- set.status = 404
217
- return "Not Found"
218
- }
219
-
220
- // Check if it's a directory
221
- const stats = statSync(filePath)
222
- if (stats.isDirectory()) {
223
- const indexPath = join(filePath, config.indexFile)
224
- if (existsSync(indexPath)) {
225
- return serveFile(indexPath, config, set, context)
226
- }
227
-
228
- set.status = 404
229
- return "Not Found"
230
- }
231
-
232
- return serveFile(filePath, config, set, context)
233
- }
234
-
235
- // Serve individual file
236
- function serveFile(filePath: string, config: any, set: any, context: PluginContext) {
237
- const ext = extname(filePath)
238
- const file = Bun.file(filePath)
239
-
240
- // Set content type
241
- const mimeTypes: Record<string, string> = {
242
- '.html': 'text/html',
243
- '.css': 'text/css',
244
- '.js': 'application/javascript',
245
- '.json': 'application/json',
246
- '.png': 'image/png',
247
- '.jpg': 'image/jpeg',
248
- '.jpeg': 'image/jpeg',
249
- '.gif': 'image/gif',
250
- '.svg': 'image/svg+xml',
251
- '.ico': 'image/x-icon',
252
- '.woff': 'font/woff',
253
- '.woff2': 'font/woff2',
254
- '.ttf': 'font/ttf',
255
- '.eot': 'application/vnd.ms-fontobject'
256
- }
257
-
258
- const contentType = mimeTypes[ext] || 'application/octet-stream'
259
- set.headers['Content-Type'] = contentType
260
-
261
- // Set cache headers
262
- if (config.cacheControl.enabled) {
263
- if (ext === '.html') {
264
- // Don't cache HTML files aggressively
265
- set.headers['Cache-Control'] = 'no-cache'
266
- } else {
267
- // Cache assets aggressively
268
- const maxAge = config.cacheControl.maxAge
269
- const cacheControl = config.cacheControl.immutable
270
- ? `public, max-age=${maxAge}, immutable`
271
- : `public, max-age=${maxAge}`
272
- set.headers['Cache-Control'] = cacheControl
273
- }
274
- }
275
-
276
- // Add compression hint if enabled
277
- if (config.compression.enabled && config.compression.types.includes(ext)) {
278
- set.headers['Vary'] = 'Accept-Encoding'
279
- }
280
-
281
- context.logger.debug(`Serving static file: ${filePath}`, {
282
- contentType,
283
- size: file.size
284
- })
285
-
286
- return file
287
- }
288
-
289
- export default staticPlugin
@@ -1,229 +0,0 @@
1
- import { swagger } from '@elysiajs/swagger'
2
- import type { Plugin, PluginContext } from '../../types'
3
-
4
- export const swaggerPlugin: Plugin = {
5
- name: 'swagger',
6
- version: '1.0.0',
7
- description: 'Enhanced Swagger documentation plugin for FluxStack with customizable options',
8
- author: 'FluxStack Team',
9
- priority: 'normal',
10
- category: 'documentation',
11
- tags: ['swagger', 'documentation', 'api'],
12
- dependencies: [], // No dependencies
13
-
14
- configSchema: {
15
- type: 'object',
16
- properties: {
17
- enabled: {
18
- type: 'boolean',
19
- description: 'Enable Swagger documentation'
20
- },
21
- path: {
22
- type: 'string',
23
- description: 'Swagger UI path'
24
- },
25
- title: {
26
- type: 'string',
27
- description: 'API documentation title'
28
- },
29
- description: {
30
- type: 'string',
31
- description: 'API documentation description'
32
- },
33
- version: {
34
- type: 'string',
35
- description: 'API version'
36
- },
37
- tags: {
38
- type: 'array',
39
- items: {
40
- type: 'object',
41
- properties: {
42
- name: { type: 'string' },
43
- description: { type: 'string' }
44
- },
45
- required: ['name']
46
- },
47
- description: 'API tags for grouping endpoints'
48
- },
49
- servers: {
50
- type: 'array',
51
- items: {
52
- type: 'object',
53
- properties: {
54
- url: { type: 'string' },
55
- description: { type: 'string' }
56
- },
57
- required: ['url']
58
- },
59
- description: 'API servers'
60
- },
61
- excludePaths: {
62
- type: 'array',
63
- items: { type: 'string' },
64
- description: 'Paths to exclude from documentation'
65
- },
66
- securitySchemes: {
67
- type: 'object',
68
- description: 'Security schemes definition'
69
- },
70
- globalSecurity: {
71
- type: 'array',
72
- items: {
73
- type: 'object'
74
- },
75
- description: 'Global security requirements'
76
- }
77
- },
78
- additionalProperties: false
79
- },
80
-
81
- defaultConfig: {
82
- enabled: true,
83
- path: '/swagger',
84
- title: 'FluxStack API',
85
- description: 'Modern full-stack TypeScript framework with type-safe API endpoints',
86
- version: '1.0.0',
87
- tags: [
88
- {
89
- name: 'Health',
90
- description: 'Health check endpoints'
91
- },
92
- {
93
- name: 'API',
94
- description: 'API endpoints'
95
- }
96
- ],
97
- servers: [],
98
- excludePaths: [],
99
- securitySchemes: {},
100
- globalSecurity: []
101
- },
102
-
103
- setup: async (context: PluginContext) => {
104
- const config = getPluginConfig(context)
105
-
106
- if (!config.enabled) {
107
- context.logger.info('Swagger plugin disabled by configuration')
108
- return
109
- }
110
-
111
- try {
112
- // Build servers list
113
- const servers = config.servers.length > 0 ? config.servers : [
114
- {
115
- url: `http://${context.config.server.host}:${context.config.server.port}`,
116
- description: 'Development server'
117
- }
118
- ]
119
-
120
- // Add production server if in production
121
- if (context.utils.isProduction()) {
122
- servers.push({
123
- url: 'https://api.example.com', // This would be configured
124
- description: 'Production server'
125
- })
126
- }
127
-
128
- const swaggerConfig = {
129
- path: config.path,
130
- documentation: {
131
- info: {
132
- title: config.title || context.config.app?.name || 'FluxStack API',
133
- version: config.version || context.config.app?.version || '1.0.0',
134
- description: config.description || context.config.app?.description || 'Modern full-stack TypeScript framework with type-safe API endpoints'
135
- },
136
- tags: config.tags,
137
- servers,
138
-
139
- // Add security schemes if defined
140
- ...(Object.keys(config.securitySchemes).length > 0 && {
141
- components: {
142
- securitySchemes: config.securitySchemes
143
- }
144
- }),
145
-
146
- // Add global security if defined
147
- ...(config.globalSecurity.length > 0 && {
148
- security: config.globalSecurity
149
- })
150
- },
151
- exclude: config.excludePaths,
152
- swaggerOptions: {
153
- persistAuthorization: true,
154
- displayRequestDuration: true,
155
- filter: true,
156
- showExtensions: true,
157
- tryItOutEnabled: true
158
- }
159
- }
160
-
161
- context.app.use(swagger(swaggerConfig))
162
-
163
- context.logger.info(`Swagger documentation enabled at ${config.path}`, {
164
- title: swaggerConfig.documentation.info.title,
165
- version: swaggerConfig.documentation.info.version,
166
- servers: servers.length
167
- })
168
- } catch (error) {
169
- context.logger.error('Failed to setup Swagger plugin', { error })
170
- throw error
171
- }
172
- },
173
-
174
- onServerStart: async (context: PluginContext) => {
175
- const config = getPluginConfig(context)
176
-
177
- if (config.enabled) {
178
- const swaggerUrl = `http://${context.config.server.host}:${context.config.server.port}${config.path}`
179
- context.logger.info(`Swagger documentation available at: ${swaggerUrl}`)
180
- }
181
- }
182
- }
183
-
184
- // Helper function to get plugin config from context
185
- function getPluginConfig(context: PluginContext) {
186
- // In a real implementation, this would get the config from the plugin context
187
- // For now, merge default config with any provided config
188
- const pluginConfig = context.config.plugins.config?.swagger || {}
189
- return { ...swaggerPlugin.defaultConfig, ...pluginConfig }
190
- }
191
-
192
- // Example usage for security configuration:
193
- //
194
- // To enable security in your FluxStack app, configure like this:
195
- //
196
- // plugins: {
197
- // config: {
198
- // swagger: {
199
- // securitySchemes: {
200
- // bearerAuth: {
201
- // type: 'http',
202
- // scheme: 'bearer',
203
- // bearerFormat: 'JWT'
204
- // },
205
- // apiKeyAuth: {
206
- // type: 'apiKey',
207
- // in: 'header',
208
- // name: 'X-API-Key'
209
- // }
210
- // },
211
- // globalSecurity: [
212
- // { bearerAuth: [] } // Apply JWT auth globally
213
- // ]
214
- // }
215
- // }
216
- // }
217
- //
218
- // Then in your routes, you can override per endpoint:
219
- // app.get('/public', handler, {
220
- // detail: { security: [] } // No auth required
221
- // })
222
- //
223
- // app.get('/private', handler, {
224
- // detail: {
225
- // security: [{ apiKeyAuth: [] }] // API key required
226
- // }
227
- // })
228
-
229
- export default swaggerPlugin