create-fluxstack 1.0.4 β 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.
- package/.claude/settings.local.json +6 -1
- package/create-fluxstack.ts +10 -6
- package/package.json +1 -1
- package/ENV_TESTING_REPORT.md +0 -292
- package/FRAMEWORK_ROADMAP.md +0 -183
- package/FRONTEND_TESTS_README.md +0 -287
- package/TEST_RESULTS.md +0 -130
- package/docs/dynamic-environment-variables.md +0 -380
- package/examples/dynamic-env-usage.ts +0 -283
- package/examples/hybrid-env-strategy.ts +0 -212
- package/examples/simplified-env-usage.ts +0 -251
- package/meu-app-teste/README.md +0 -44
- package/meu-app-teste/app/client/README.md +0 -69
- package/meu-app-teste/app/client/frontend-only.ts +0 -12
- package/meu-app-teste/app/client/index.html +0 -13
- package/meu-app-teste/app/client/public/vite.svg +0 -1
- package/meu-app-teste/app/client/src/App.css +0 -883
- package/meu-app-teste/app/client/src/App.tsx +0 -669
- package/meu-app-teste/app/client/src/assets/react.svg +0 -1
- package/meu-app-teste/app/client/src/components/TestPage.tsx +0 -453
- package/meu-app-teste/app/client/src/index.css +0 -51
- package/meu-app-teste/app/client/src/lib/eden-api.ts +0 -110
- package/meu-app-teste/app/client/src/main.tsx +0 -10
- package/meu-app-teste/app/client/src/vite-env.d.ts +0 -1
- package/meu-app-teste/app/client/tsconfig.app.json +0 -43
- package/meu-app-teste/app/client/tsconfig.json +0 -7
- package/meu-app-teste/app/client/tsconfig.node.json +0 -25
- package/meu-app-teste/app/server/app.ts +0 -10
- package/meu-app-teste/app/server/backend-only.ts +0 -15
- package/meu-app-teste/app/server/controllers/users.controller.ts +0 -69
- package/meu-app-teste/app/server/index.ts +0 -104
- package/meu-app-teste/app/server/routes/index.ts +0 -25
- package/meu-app-teste/app/server/routes/users.routes.ts +0 -121
- package/meu-app-teste/app/server/types/index.ts +0 -1
- package/meu-app-teste/app/shared/types/index.ts +0 -18
- package/meu-app-teste/bun.lock +0 -1053
- package/meu-app-teste/core/__tests__/integration.test.ts +0 -227
- package/meu-app-teste/core/build/index.ts +0 -186
- package/meu-app-teste/core/cli/command-registry.ts +0 -334
- package/meu-app-teste/core/cli/index.ts +0 -394
- package/meu-app-teste/core/cli/plugin-discovery.ts +0 -200
- package/meu-app-teste/core/client/standalone.ts +0 -57
- package/meu-app-teste/core/config/__tests__/config-loader.test.ts +0 -591
- package/meu-app-teste/core/config/__tests__/config-merger.test.ts +0 -657
- package/meu-app-teste/core/config/__tests__/env-converter.test.ts +0 -372
- package/meu-app-teste/core/config/__tests__/env-processor.test.ts +0 -431
- package/meu-app-teste/core/config/__tests__/env.test.ts +0 -452
- package/meu-app-teste/core/config/__tests__/integration.test.ts +0 -418
- package/meu-app-teste/core/config/__tests__/loader.test.ts +0 -331
- package/meu-app-teste/core/config/__tests__/schema.test.ts +0 -129
- package/meu-app-teste/core/config/__tests__/validator.test.ts +0 -318
- package/meu-app-teste/core/config/env-dynamic.ts +0 -326
- package/meu-app-teste/core/config/env.ts +0 -597
- package/meu-app-teste/core/config/index.ts +0 -317
- package/meu-app-teste/core/config/loader.ts +0 -546
- package/meu-app-teste/core/config/runtime-config.ts +0 -322
- package/meu-app-teste/core/config/schema.ts +0 -694
- package/meu-app-teste/core/config/validator.ts +0 -540
- package/meu-app-teste/core/framework/__tests__/server.test.ts +0 -233
- package/meu-app-teste/core/framework/client.ts +0 -132
- package/meu-app-teste/core/framework/index.ts +0 -8
- package/meu-app-teste/core/framework/server.ts +0 -501
- package/meu-app-teste/core/framework/types.ts +0 -63
- package/meu-app-teste/core/plugins/__tests__/built-in.test.ts.disabled +0 -366
- package/meu-app-teste/core/plugins/__tests__/manager.test.ts +0 -398
- package/meu-app-teste/core/plugins/__tests__/monitoring.test.ts +0 -401
- package/meu-app-teste/core/plugins/__tests__/registry.test.ts +0 -335
- package/meu-app-teste/core/plugins/built-in/index.ts +0 -142
- package/meu-app-teste/core/plugins/built-in/logger/index.ts +0 -180
- package/meu-app-teste/core/plugins/built-in/monitoring/README.md +0 -193
- package/meu-app-teste/core/plugins/built-in/monitoring/index.ts +0 -912
- package/meu-app-teste/core/plugins/built-in/static/index.ts +0 -289
- package/meu-app-teste/core/plugins/built-in/swagger/index.ts +0 -229
- package/meu-app-teste/core/plugins/built-in/vite/index.ts +0 -316
- package/meu-app-teste/core/plugins/config.ts +0 -348
- package/meu-app-teste/core/plugins/discovery.ts +0 -350
- package/meu-app-teste/core/plugins/executor.ts +0 -351
- package/meu-app-teste/core/plugins/index.ts +0 -195
- package/meu-app-teste/core/plugins/manager.ts +0 -583
- package/meu-app-teste/core/plugins/registry.ts +0 -424
- package/meu-app-teste/core/plugins/types.ts +0 -254
- package/meu-app-teste/core/server/framework.ts +0 -123
- package/meu-app-teste/core/server/index.ts +0 -8
- package/meu-app-teste/core/server/plugins/database.ts +0 -182
- package/meu-app-teste/core/server/plugins/logger.ts +0 -47
- package/meu-app-teste/core/server/plugins/swagger.ts +0 -34
- package/meu-app-teste/core/server/standalone.ts +0 -91
- package/meu-app-teste/core/templates/create-project.ts +0 -455
- package/meu-app-teste/core/types/api.ts +0 -169
- package/meu-app-teste/core/types/build.ts +0 -174
- package/meu-app-teste/core/types/config.ts +0 -68
- package/meu-app-teste/core/types/index.ts +0 -127
- package/meu-app-teste/core/types/plugin.ts +0 -94
- package/meu-app-teste/core/utils/__tests__/errors.test.ts +0 -139
- package/meu-app-teste/core/utils/__tests__/helpers.test.ts +0 -297
- package/meu-app-teste/core/utils/__tests__/logger.test.ts +0 -141
- package/meu-app-teste/core/utils/env-runtime-v2.ts +0 -232
- package/meu-app-teste/core/utils/env-runtime.ts +0 -252
- package/meu-app-teste/core/utils/errors/codes.ts +0 -115
- package/meu-app-teste/core/utils/errors/handlers.ts +0 -63
- package/meu-app-teste/core/utils/errors/index.ts +0 -81
- package/meu-app-teste/core/utils/helpers.ts +0 -180
- package/meu-app-teste/core/utils/index.ts +0 -18
- package/meu-app-teste/core/utils/logger/index.ts +0 -161
- package/meu-app-teste/core/utils/logger.ts +0 -106
- package/meu-app-teste/core/utils/monitoring/index.ts +0 -212
- package/meu-app-teste/package.json +0 -92
- package/meu-app-teste/tsconfig.json +0 -51
- package/meu-app-teste/vite.config.ts +0 -42
- package/my-final-test/README.md +0 -44
- package/my-final-test/app/client/README.md +0 -69
- package/my-final-test/app/client/frontend-only.ts +0 -12
- package/my-final-test/app/client/index.html +0 -13
- package/my-final-test/app/client/public/vite.svg +0 -1
- package/my-final-test/app/client/src/App.css +0 -883
- package/my-final-test/app/client/src/App.tsx +0 -669
- package/my-final-test/app/client/src/assets/react.svg +0 -1
- package/my-final-test/app/client/src/components/TestPage.tsx +0 -453
- package/my-final-test/app/client/src/index.css +0 -51
- package/my-final-test/app/client/src/lib/eden-api.ts +0 -110
- package/my-final-test/app/client/src/main.tsx +0 -10
- package/my-final-test/app/client/src/vite-env.d.ts +0 -1
- package/my-final-test/app/client/tsconfig.app.json +0 -43
- package/my-final-test/app/client/tsconfig.json +0 -7
- package/my-final-test/app/client/tsconfig.node.json +0 -25
- package/my-final-test/app/server/app.ts +0 -10
- package/my-final-test/app/server/backend-only.ts +0 -15
- package/my-final-test/app/server/controllers/users.controller.ts +0 -69
- package/my-final-test/app/server/index.ts +0 -104
- package/my-final-test/app/server/routes/index.ts +0 -25
- package/my-final-test/app/server/routes/users.routes.ts +0 -121
- package/my-final-test/app/server/types/index.ts +0 -1
- package/my-final-test/app/shared/types/index.ts +0 -18
- package/my-final-test/bun.lock +0 -993
- package/my-final-test/core/__tests__/integration.test.ts +0 -227
- package/my-final-test/core/build/index.ts +0 -186
- package/my-final-test/core/cli/command-registry.ts +0 -334
- package/my-final-test/core/cli/index.ts +0 -394
- package/my-final-test/core/cli/plugin-discovery.ts +0 -200
- package/my-final-test/core/client/standalone.ts +0 -57
- package/my-final-test/core/config/__tests__/config-loader.test.ts +0 -591
- package/my-final-test/core/config/__tests__/config-merger.test.ts +0 -657
- package/my-final-test/core/config/__tests__/env-converter.test.ts +0 -372
- package/my-final-test/core/config/__tests__/env-processor.test.ts +0 -431
- package/my-final-test/core/config/__tests__/env.test.ts +0 -452
- package/my-final-test/core/config/__tests__/integration.test.ts +0 -418
- package/my-final-test/core/config/__tests__/loader.test.ts +0 -331
- package/my-final-test/core/config/__tests__/schema.test.ts +0 -129
- package/my-final-test/core/config/__tests__/validator.test.ts +0 -318
- package/my-final-test/core/config/env-dynamic.ts +0 -326
- package/my-final-test/core/config/env.ts +0 -597
- package/my-final-test/core/config/index.ts +0 -317
- package/my-final-test/core/config/loader.ts +0 -546
- package/my-final-test/core/config/runtime-config.ts +0 -322
- package/my-final-test/core/config/schema.ts +0 -694
- package/my-final-test/core/config/validator.ts +0 -540
- package/my-final-test/core/framework/__tests__/server.test.ts +0 -233
- package/my-final-test/core/framework/client.ts +0 -132
- package/my-final-test/core/framework/index.ts +0 -8
- package/my-final-test/core/framework/server.ts +0 -501
- package/my-final-test/core/framework/types.ts +0 -63
- package/my-final-test/core/plugins/__tests__/built-in.test.ts.disabled +0 -366
- package/my-final-test/core/plugins/__tests__/manager.test.ts +0 -398
- package/my-final-test/core/plugins/__tests__/monitoring.test.ts +0 -401
- package/my-final-test/core/plugins/__tests__/registry.test.ts +0 -335
- package/my-final-test/core/plugins/built-in/index.ts +0 -142
- package/my-final-test/core/plugins/built-in/logger/index.ts +0 -180
- package/my-final-test/core/plugins/built-in/monitoring/README.md +0 -193
- package/my-final-test/core/plugins/built-in/monitoring/index.ts +0 -912
- package/my-final-test/core/plugins/built-in/static/index.ts +0 -289
- package/my-final-test/core/plugins/built-in/swagger/index.ts +0 -229
- package/my-final-test/core/plugins/built-in/vite/index.ts +0 -316
- package/my-final-test/core/plugins/config.ts +0 -348
- package/my-final-test/core/plugins/discovery.ts +0 -350
- package/my-final-test/core/plugins/executor.ts +0 -351
- package/my-final-test/core/plugins/index.ts +0 -195
- package/my-final-test/core/plugins/manager.ts +0 -583
- package/my-final-test/core/plugins/registry.ts +0 -424
- package/my-final-test/core/plugins/types.ts +0 -254
- package/my-final-test/core/server/framework.ts +0 -123
- package/my-final-test/core/server/index.ts +0 -8
- package/my-final-test/core/server/plugins/database.ts +0 -182
- package/my-final-test/core/server/plugins/logger.ts +0 -47
- package/my-final-test/core/server/plugins/swagger.ts +0 -34
- package/my-final-test/core/server/standalone.ts +0 -91
- package/my-final-test/core/templates/create-project.ts +0 -455
- package/my-final-test/core/types/api.ts +0 -169
- package/my-final-test/core/types/build.ts +0 -174
- package/my-final-test/core/types/config.ts +0 -68
- package/my-final-test/core/types/index.ts +0 -127
- package/my-final-test/core/types/plugin.ts +0 -94
- package/my-final-test/core/utils/__tests__/errors.test.ts +0 -139
- package/my-final-test/core/utils/__tests__/helpers.test.ts +0 -297
- package/my-final-test/core/utils/__tests__/logger.test.ts +0 -141
- package/my-final-test/core/utils/env-runtime-v2.ts +0 -232
- package/my-final-test/core/utils/env-runtime.ts +0 -252
- package/my-final-test/core/utils/errors/codes.ts +0 -115
- package/my-final-test/core/utils/errors/handlers.ts +0 -63
- package/my-final-test/core/utils/errors/index.ts +0 -81
- package/my-final-test/core/utils/helpers.ts +0 -180
- package/my-final-test/core/utils/index.ts +0 -18
- package/my-final-test/core/utils/logger/index.ts +0 -161
- package/my-final-test/core/utils/logger.ts +0 -106
- package/my-final-test/core/utils/monitoring/index.ts +0 -212
- package/my-final-test/package.json +0 -68
- package/my-final-test/tsconfig.json +0 -51
- package/my-final-test/vite.config.ts +0 -42
- package/publish-setup.md +0 -111
- package/teste-corrigido/README.md +0 -44
- package/teste-corrigido/app/client/README.md +0 -69
- package/teste-corrigido/app/client/frontend-only.ts +0 -12
- package/teste-corrigido/app/client/index.html +0 -13
- package/teste-corrigido/app/client/public/vite.svg +0 -1
- package/teste-corrigido/app/client/src/App.css +0 -883
- package/teste-corrigido/app/client/src/App.tsx +0 -669
- package/teste-corrigido/app/client/src/assets/react.svg +0 -1
- package/teste-corrigido/app/client/src/components/TestPage.tsx +0 -453
- package/teste-corrigido/app/client/src/index.css +0 -51
- package/teste-corrigido/app/client/src/lib/eden-api.ts +0 -110
- package/teste-corrigido/app/client/src/main.tsx +0 -10
- package/teste-corrigido/app/client/src/vite-env.d.ts +0 -1
- package/teste-corrigido/app/client/tsconfig.app.json +0 -43
- package/teste-corrigido/app/client/tsconfig.json +0 -7
- package/teste-corrigido/app/client/tsconfig.node.json +0 -25
- package/teste-corrigido/app/server/app.ts +0 -10
- package/teste-corrigido/app/server/backend-only.ts +0 -15
- package/teste-corrigido/app/server/controllers/users.controller.ts +0 -69
- package/teste-corrigido/app/server/index.ts +0 -104
- package/teste-corrigido/app/server/routes/index.ts +0 -25
- package/teste-corrigido/app/server/routes/users.routes.ts +0 -121
- package/teste-corrigido/app/server/types/index.ts +0 -1
- package/teste-corrigido/app/shared/types/index.ts +0 -18
- package/teste-corrigido/bun.lock +0 -1053
- package/teste-corrigido/core/__tests__/integration.test.ts +0 -227
- package/teste-corrigido/core/build/index.ts +0 -186
- package/teste-corrigido/core/cli/command-registry.ts +0 -334
- package/teste-corrigido/core/cli/index.ts +0 -394
- package/teste-corrigido/core/cli/plugin-discovery.ts +0 -200
- package/teste-corrigido/core/client/standalone.ts +0 -57
- package/teste-corrigido/core/config/__tests__/config-loader.test.ts +0 -591
- package/teste-corrigido/core/config/__tests__/config-merger.test.ts +0 -657
- package/teste-corrigido/core/config/__tests__/env-converter.test.ts +0 -372
- package/teste-corrigido/core/config/__tests__/env-processor.test.ts +0 -431
- package/teste-corrigido/core/config/__tests__/env.test.ts +0 -452
- package/teste-corrigido/core/config/__tests__/integration.test.ts +0 -418
- package/teste-corrigido/core/config/__tests__/loader.test.ts +0 -331
- package/teste-corrigido/core/config/__tests__/schema.test.ts +0 -129
- package/teste-corrigido/core/config/__tests__/validator.test.ts +0 -318
- package/teste-corrigido/core/config/env-dynamic.ts +0 -326
- package/teste-corrigido/core/config/env.ts +0 -597
- package/teste-corrigido/core/config/index.ts +0 -317
- package/teste-corrigido/core/config/loader.ts +0 -546
- package/teste-corrigido/core/config/runtime-config.ts +0 -322
- package/teste-corrigido/core/config/schema.ts +0 -694
- package/teste-corrigido/core/config/validator.ts +0 -540
- package/teste-corrigido/core/framework/__tests__/server.test.ts +0 -233
- package/teste-corrigido/core/framework/client.ts +0 -132
- package/teste-corrigido/core/framework/index.ts +0 -8
- package/teste-corrigido/core/framework/server.ts +0 -501
- package/teste-corrigido/core/framework/types.ts +0 -63
- package/teste-corrigido/core/plugins/__tests__/built-in.test.ts.disabled +0 -366
- package/teste-corrigido/core/plugins/__tests__/manager.test.ts +0 -398
- package/teste-corrigido/core/plugins/__tests__/monitoring.test.ts +0 -401
- package/teste-corrigido/core/plugins/__tests__/registry.test.ts +0 -335
- package/teste-corrigido/core/plugins/built-in/index.ts +0 -142
- package/teste-corrigido/core/plugins/built-in/logger/index.ts +0 -180
- package/teste-corrigido/core/plugins/built-in/monitoring/README.md +0 -193
- package/teste-corrigido/core/plugins/built-in/monitoring/index.ts +0 -912
- package/teste-corrigido/core/plugins/built-in/static/index.ts +0 -289
- package/teste-corrigido/core/plugins/built-in/swagger/index.ts +0 -229
- package/teste-corrigido/core/plugins/built-in/vite/index.ts +0 -316
- package/teste-corrigido/core/plugins/config.ts +0 -348
- package/teste-corrigido/core/plugins/discovery.ts +0 -350
- package/teste-corrigido/core/plugins/executor.ts +0 -351
- package/teste-corrigido/core/plugins/index.ts +0 -195
- package/teste-corrigido/core/plugins/manager.ts +0 -583
- package/teste-corrigido/core/plugins/registry.ts +0 -424
- package/teste-corrigido/core/plugins/types.ts +0 -254
- package/teste-corrigido/core/server/framework.ts +0 -123
- package/teste-corrigido/core/server/index.ts +0 -8
- package/teste-corrigido/core/server/plugins/database.ts +0 -182
- package/teste-corrigido/core/server/plugins/logger.ts +0 -47
- package/teste-corrigido/core/server/plugins/swagger.ts +0 -34
- package/teste-corrigido/core/server/standalone.ts +0 -91
- package/teste-corrigido/core/templates/create-project.ts +0 -455
- package/teste-corrigido/core/types/api.ts +0 -169
- package/teste-corrigido/core/types/build.ts +0 -174
- package/teste-corrigido/core/types/config.ts +0 -68
- package/teste-corrigido/core/types/index.ts +0 -127
- package/teste-corrigido/core/types/plugin.ts +0 -94
- package/teste-corrigido/core/utils/__tests__/errors.test.ts +0 -139
- package/teste-corrigido/core/utils/__tests__/helpers.test.ts +0 -297
- package/teste-corrigido/core/utils/__tests__/logger.test.ts +0 -141
- package/teste-corrigido/core/utils/env-runtime-v2.ts +0 -232
- package/teste-corrigido/core/utils/env-runtime.ts +0 -252
- package/teste-corrigido/core/utils/errors/codes.ts +0 -115
- package/teste-corrigido/core/utils/errors/handlers.ts +0 -63
- package/teste-corrigido/core/utils/errors/index.ts +0 -81
- package/teste-corrigido/core/utils/helpers.ts +0 -180
- package/teste-corrigido/core/utils/index.ts +0 -18
- package/teste-corrigido/core/utils/logger/index.ts +0 -161
- package/teste-corrigido/core/utils/logger.ts +0 -106
- package/teste-corrigido/core/utils/monitoring/index.ts +0 -212
- package/teste-corrigido/package-template.json +0 -51
- package/teste-corrigido/package.json +0 -51
- package/teste-corrigido/tsconfig.json +0 -51
- package/teste-corrigido/vite.config.ts +0 -42
- package/teste-final-npm/README.md +0 -44
- package/teste-final-npm/app/client/README.md +0 -69
- package/teste-final-npm/app/client/frontend-only.ts +0 -12
- package/teste-final-npm/app/client/index.html +0 -13
- package/teste-final-npm/app/client/public/vite.svg +0 -1
- package/teste-final-npm/app/client/src/App.css +0 -883
- package/teste-final-npm/app/client/src/App.tsx +0 -669
- package/teste-final-npm/app/client/src/assets/react.svg +0 -1
- package/teste-final-npm/app/client/src/components/TestPage.tsx +0 -453
- package/teste-final-npm/app/client/src/index.css +0 -51
- package/teste-final-npm/app/client/src/lib/eden-api.ts +0 -110
- package/teste-final-npm/app/client/src/main.tsx +0 -10
- package/teste-final-npm/app/client/src/vite-env.d.ts +0 -1
- package/teste-final-npm/app/client/tsconfig.app.json +0 -43
- package/teste-final-npm/app/client/tsconfig.json +0 -7
- package/teste-final-npm/app/client/tsconfig.node.json +0 -25
- package/teste-final-npm/app/server/app.ts +0 -10
- package/teste-final-npm/app/server/backend-only.ts +0 -15
- package/teste-final-npm/app/server/controllers/users.controller.ts +0 -69
- package/teste-final-npm/app/server/index.ts +0 -104
- package/teste-final-npm/app/server/routes/index.ts +0 -25
- package/teste-final-npm/app/server/routes/users.routes.ts +0 -121
- package/teste-final-npm/app/server/types/index.ts +0 -1
- package/teste-final-npm/app/shared/types/index.ts +0 -18
- package/teste-final-npm/bun.lock +0 -1053
- package/teste-final-npm/core/__tests__/integration.test.ts +0 -227
- package/teste-final-npm/core/build/index.ts +0 -186
- package/teste-final-npm/core/cli/command-registry.ts +0 -334
- package/teste-final-npm/core/cli/index.ts +0 -394
- package/teste-final-npm/core/cli/plugin-discovery.ts +0 -200
- package/teste-final-npm/core/client/standalone.ts +0 -57
- package/teste-final-npm/core/config/__tests__/config-loader.test.ts +0 -591
- package/teste-final-npm/core/config/__tests__/config-merger.test.ts +0 -657
- package/teste-final-npm/core/config/__tests__/env-converter.test.ts +0 -372
- package/teste-final-npm/core/config/__tests__/env-processor.test.ts +0 -431
- package/teste-final-npm/core/config/__tests__/env.test.ts +0 -452
- package/teste-final-npm/core/config/__tests__/integration.test.ts +0 -418
- package/teste-final-npm/core/config/__tests__/loader.test.ts +0 -331
- package/teste-final-npm/core/config/__tests__/schema.test.ts +0 -129
- package/teste-final-npm/core/config/__tests__/validator.test.ts +0 -318
- package/teste-final-npm/core/config/env-dynamic.ts +0 -326
- package/teste-final-npm/core/config/env.ts +0 -597
- package/teste-final-npm/core/config/index.ts +0 -317
- package/teste-final-npm/core/config/loader.ts +0 -546
- package/teste-final-npm/core/config/runtime-config.ts +0 -322
- package/teste-final-npm/core/config/schema.ts +0 -694
- package/teste-final-npm/core/config/validator.ts +0 -540
- package/teste-final-npm/core/framework/__tests__/server.test.ts +0 -233
- package/teste-final-npm/core/framework/client.ts +0 -132
- package/teste-final-npm/core/framework/index.ts +0 -8
- package/teste-final-npm/core/framework/server.ts +0 -501
- package/teste-final-npm/core/framework/types.ts +0 -63
- package/teste-final-npm/core/plugins/__tests__/built-in.test.ts.disabled +0 -366
- package/teste-final-npm/core/plugins/__tests__/manager.test.ts +0 -398
- package/teste-final-npm/core/plugins/__tests__/monitoring.test.ts +0 -401
- package/teste-final-npm/core/plugins/__tests__/registry.test.ts +0 -335
- package/teste-final-npm/core/plugins/built-in/index.ts +0 -142
- package/teste-final-npm/core/plugins/built-in/logger/index.ts +0 -180
- package/teste-final-npm/core/plugins/built-in/monitoring/README.md +0 -193
- package/teste-final-npm/core/plugins/built-in/monitoring/index.ts +0 -912
- package/teste-final-npm/core/plugins/built-in/static/index.ts +0 -289
- package/teste-final-npm/core/plugins/built-in/swagger/index.ts +0 -229
- package/teste-final-npm/core/plugins/built-in/vite/index.ts +0 -316
- package/teste-final-npm/core/plugins/config.ts +0 -348
- package/teste-final-npm/core/plugins/discovery.ts +0 -350
- package/teste-final-npm/core/plugins/executor.ts +0 -351
- package/teste-final-npm/core/plugins/index.ts +0 -195
- package/teste-final-npm/core/plugins/manager.ts +0 -583
- package/teste-final-npm/core/plugins/registry.ts +0 -424
- package/teste-final-npm/core/plugins/types.ts +0 -254
- package/teste-final-npm/core/server/framework.ts +0 -123
- package/teste-final-npm/core/server/index.ts +0 -8
- package/teste-final-npm/core/server/plugins/database.ts +0 -182
- package/teste-final-npm/core/server/plugins/logger.ts +0 -47
- package/teste-final-npm/core/server/plugins/swagger.ts +0 -34
- package/teste-final-npm/core/server/standalone.ts +0 -91
- package/teste-final-npm/core/templates/create-project.ts +0 -455
- package/teste-final-npm/core/types/api.ts +0 -169
- package/teste-final-npm/core/types/build.ts +0 -174
- package/teste-final-npm/core/types/config.ts +0 -68
- package/teste-final-npm/core/types/index.ts +0 -127
- package/teste-final-npm/core/types/plugin.ts +0 -94
- package/teste-final-npm/core/utils/__tests__/errors.test.ts +0 -139
- package/teste-final-npm/core/utils/__tests__/helpers.test.ts +0 -297
- package/teste-final-npm/core/utils/__tests__/logger.test.ts +0 -141
- package/teste-final-npm/core/utils/env-runtime-v2.ts +0 -232
- package/teste-final-npm/core/utils/env-runtime.ts +0 -252
- package/teste-final-npm/core/utils/errors/codes.ts +0 -115
- package/teste-final-npm/core/utils/errors/handlers.ts +0 -63
- package/teste-final-npm/core/utils/errors/index.ts +0 -81
- package/teste-final-npm/core/utils/helpers.ts +0 -180
- package/teste-final-npm/core/utils/index.ts +0 -18
- package/teste-final-npm/core/utils/logger/index.ts +0 -161
- package/teste-final-npm/core/utils/logger.ts +0 -106
- package/teste-final-npm/core/utils/monitoring/index.ts +0 -212
- package/teste-final-npm/package-template.json +0 -51
- package/teste-final-npm/package.json +0 -51
- package/teste-final-npm/tsconfig.json +0 -51
- package/teste-final-npm/vite.config.ts +0 -42
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* EstratΓ©gia HΓbrida: Env Fixado + Env DinΓ’mico
|
|
3
|
-
* Use o melhor de cada abordagem conforme necessΓ‘rio
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { env } from '@/core/utils/env-runtime'
|
|
7
|
-
|
|
8
|
-
// ========================================
|
|
9
|
-
// CONFIGURAΓΓES FIXADAS (Build-time)
|
|
10
|
-
// ========================================
|
|
11
|
-
// Use para valores que nunca mudam ou precisam de mΓ‘xima performance
|
|
12
|
-
|
|
13
|
-
// App metadata - fixado Γ© OK
|
|
14
|
-
const APP_NAME = process.env.FLUXSTACK_APP_NAME || 'FluxStack'
|
|
15
|
-
const APP_VERSION = process.env.FLUXSTACK_APP_VERSION || '1.0.0'
|
|
16
|
-
|
|
17
|
-
// Feature flags - fixado Γ© OK
|
|
18
|
-
const ENABLE_SWAGGER = process.env.ENABLE_SWAGGER !== 'false'
|
|
19
|
-
const ENABLE_CORS = process.env.ENABLE_CORS !== 'false'
|
|
20
|
-
|
|
21
|
-
// Build configuration - fixado Γ© ideal
|
|
22
|
-
const BUILD_TARGET = process.env.BUILD_TARGET || 'bun'
|
|
23
|
-
const CLIENT_OUTDIR = process.env.CLIENT_OUTDIR || 'dist/client'
|
|
24
|
-
|
|
25
|
-
// ========================================
|
|
26
|
-
// CONFIGURAΓΓES DINΓMICAS (Runtime)
|
|
27
|
-
// ========================================
|
|
28
|
-
// Use para valores que precisam mudar em diferentes deploys
|
|
29
|
-
|
|
30
|
-
// Server config - deve ser dinΓ’mico
|
|
31
|
-
const getServerConfig = () => ({
|
|
32
|
-
port: env.num('PORT', 3000), // π DinΓ’mico
|
|
33
|
-
host: env.get('HOST', 'localhost'), // π DinΓ’mico
|
|
34
|
-
apiPrefix: env.get('API_PREFIX', '/api')
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
// Database - deve ser dinΓ’mico
|
|
38
|
-
const getDatabaseConfig = () => ({
|
|
39
|
-
url: env.get('DATABASE_URL'), // π DinΓ’mico
|
|
40
|
-
maxConnections: env.num('DB_MAX_CONNECTIONS', 10),
|
|
41
|
-
ssl: env.bool('DB_SSL', env.get('NODE_ENV') === 'production')
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
// Secrets - deve ser dinΓ’mico
|
|
45
|
-
const getSecrets = () => ({
|
|
46
|
-
jwtSecret: env.get('JWT_SECRET'), // π DinΓ’mico
|
|
47
|
-
apiKey: env.get('API_KEY'),
|
|
48
|
-
encryptionKey: env.get('ENCRYPTION_KEY')
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
// Environment specific - dinΓ’mico
|
|
52
|
-
const getEnvironmentConfig = () => ({
|
|
53
|
-
nodeEnv: env.get('NODE_ENV', 'development'), // π DinΓ’mico
|
|
54
|
-
logLevel: env.get('LOG_LEVEL', 'info'),
|
|
55
|
-
debug: env.bool('DEBUG', false)
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
// ========================================
|
|
59
|
-
// CONFIGURAΓΓO HΓBRIDA
|
|
60
|
-
// ========================================
|
|
61
|
-
|
|
62
|
-
export const hybridConfig = {
|
|
63
|
-
// Fixado no build (performance mΓ‘xima)
|
|
64
|
-
app: {
|
|
65
|
-
name: APP_NAME, // β‘ Fixado
|
|
66
|
-
version: APP_VERSION, // β‘ Fixado
|
|
67
|
-
enableSwagger: ENABLE_SWAGGER, // β‘ Fixado
|
|
68
|
-
enableCors: ENABLE_CORS // β‘ Fixado
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
build: {
|
|
72
|
-
target: BUILD_TARGET, // β‘ Fixado
|
|
73
|
-
clientOutDir: CLIENT_OUTDIR // β‘ Fixado
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
// DinΓ’mico no runtime (flexibilidade mΓ‘xima)
|
|
77
|
-
runtime: {
|
|
78
|
-
server: getServerConfig(), // π DinΓ’mico
|
|
79
|
-
database: getDatabaseConfig(), // π DinΓ’mico
|
|
80
|
-
secrets: getSecrets(), // π DinΓ’mico
|
|
81
|
-
environment: getEnvironmentConfig() // π DinΓ’mico
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// ========================================
|
|
86
|
-
// EXEMPLO DE USO PRΓTICO
|
|
87
|
-
// ========================================
|
|
88
|
-
|
|
89
|
-
export function createHybridServer() {
|
|
90
|
-
console.log(`π Starting ${hybridConfig.app.name} v${hybridConfig.app.version}`)
|
|
91
|
-
|
|
92
|
-
const { server, database, environment } = hybridConfig.runtime
|
|
93
|
-
|
|
94
|
-
console.log(`π Environment: ${environment.nodeEnv}`)
|
|
95
|
-
console.log(`π Server: ${server.host}:${server.port}`)
|
|
96
|
-
console.log(`πΎ Database: ${database.url ? 'β
Connected' : 'β Not configured'}`)
|
|
97
|
-
|
|
98
|
-
// ConfiguraΓ§Γ£o do FluxStack
|
|
99
|
-
const config = {
|
|
100
|
-
// Valores fixados (build-time) - performance mΓ‘xima
|
|
101
|
-
app: hybridConfig.app,
|
|
102
|
-
build: hybridConfig.build,
|
|
103
|
-
|
|
104
|
-
// Valores dinΓ’micos (runtime) - flexibilidade mΓ‘xima
|
|
105
|
-
server: {
|
|
106
|
-
port: server.port, // π Pode mudar sem rebuild
|
|
107
|
-
host: server.host, // π Pode mudar sem rebuild
|
|
108
|
-
apiPrefix: server.apiPrefix,
|
|
109
|
-
cors: {
|
|
110
|
-
origins: env.array('CORS_ORIGINS', ['*']),
|
|
111
|
-
enabled: hybridConfig.app.enableCors // β‘ Fixado no build
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
logging: {
|
|
116
|
-
level: environment.logLevel, // π Pode mudar sem rebuild
|
|
117
|
-
debug: environment.debug
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
return config
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// ========================================
|
|
125
|
-
// OTIMIZAΓΓO POR AMBIENTE
|
|
126
|
-
// ========================================
|
|
127
|
-
|
|
128
|
-
export function createOptimizedConfig() {
|
|
129
|
-
const nodeEnv = env.get('NODE_ENV', 'development')
|
|
130
|
-
|
|
131
|
-
switch (nodeEnv) {
|
|
132
|
-
case 'development':
|
|
133
|
-
return {
|
|
134
|
-
// Development: tudo dinΓ’mico para flexibilidade
|
|
135
|
-
port: env.num('PORT', 3000), // π
|
|
136
|
-
debug: env.bool('DEBUG', true), // π
|
|
137
|
-
logLevel: env.get('LOG_LEVEL', 'debug'), // π
|
|
138
|
-
hotReload: env.bool('HOT_RELOAD', true) // π
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
case 'production':
|
|
142
|
-
return {
|
|
143
|
-
// Production: mix de fixado e dinΓ’mico
|
|
144
|
-
appName: APP_NAME, // β‘ Fixado (performance)
|
|
145
|
-
version: APP_VERSION, // β‘ Fixado (performance)
|
|
146
|
-
port: env.num('PORT', 3000), // π DinΓ’mico (deploy)
|
|
147
|
-
dbUrl: env.get('DATABASE_URL'), // π DinΓ’mico (deploy)
|
|
148
|
-
logLevel: env.get('LOG_LEVEL', 'warn') // π DinΓ’mico (ops)
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
default:
|
|
152
|
-
return createHybridServer()
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// ========================================
|
|
157
|
-
// PERFORMANCE COMPARISON
|
|
158
|
-
// ========================================
|
|
159
|
-
|
|
160
|
-
export const performanceComparison = {
|
|
161
|
-
// β‘ ULTRA RΓPIDO - Fixado no build
|
|
162
|
-
fixedConfig: {
|
|
163
|
-
port: 3000, // Literal number
|
|
164
|
-
dbUrl: "postgres://...", // Literal string
|
|
165
|
-
debug: false // Literal boolean
|
|
166
|
-
},
|
|
167
|
-
|
|
168
|
-
// π LIGEIRAMENTE MAIS LENTO - DinΓ’mico
|
|
169
|
-
dynamicConfig: {
|
|
170
|
-
port: env.num('PORT', 3000), // Function call
|
|
171
|
-
dbUrl: env.get('DATABASE_URL'), // Function call
|
|
172
|
-
debug: env.bool('DEBUG', false) // Function call
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
// ========================================
|
|
177
|
-
// MIGRAΓΓO GRADUAL
|
|
178
|
-
// ========================================
|
|
179
|
-
|
|
180
|
-
export const migrationStrategy = {
|
|
181
|
-
// Passo 1: Identifique configuraΓ§Γ΅es crΓticas
|
|
182
|
-
critical: {
|
|
183
|
-
// Use dinΓ’mico para configs que DEVEM mudar
|
|
184
|
-
port: env.num('PORT', 3000),
|
|
185
|
-
dbUrl: env.get('DATABASE_URL'),
|
|
186
|
-
secrets: env.get('JWT_SECRET')
|
|
187
|
-
},
|
|
188
|
-
|
|
189
|
-
// Passo 2: Mantenha fixado o que nΓ£o precisa mudar
|
|
190
|
-
static: {
|
|
191
|
-
appName: process.env.APP_NAME || 'MyApp',
|
|
192
|
-
version: process.env.APP_VERSION || '1.0.0',
|
|
193
|
-
features: process.env.FEATURES?.split(',') || []
|
|
194
|
-
},
|
|
195
|
-
|
|
196
|
-
// Passo 3: Migre gradualmente conforme necessΓ‘rio
|
|
197
|
-
gradually: {
|
|
198
|
-
// Comece com fixado...
|
|
199
|
-
logLevel: process.env.LOG_LEVEL || 'info',
|
|
200
|
-
|
|
201
|
-
// ...depois mude para dinΓ’mico quando precisar
|
|
202
|
-
// logLevel: env.get('LOG_LEVEL', 'info')
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
export default {
|
|
207
|
-
hybridConfig,
|
|
208
|
-
createHybridServer,
|
|
209
|
-
createOptimizedConfig,
|
|
210
|
-
performanceComparison,
|
|
211
|
-
migrationStrategy
|
|
212
|
-
}
|
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Exemplos da API simplificada de Environment Variables
|
|
3
|
-
* Mais elegante, intuitiva e com menos cΓ³digo
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { env, createNamespace, validate, helpers } from '../core/utils/env-runtime-v2'
|
|
7
|
-
|
|
8
|
-
// ========================================
|
|
9
|
-
// 1. CASTING AUTOMΓTICO INTELIGENTE
|
|
10
|
-
// ========================================
|
|
11
|
-
|
|
12
|
-
// β
NOVO - API super simples com casting automΓ‘tico
|
|
13
|
-
const config = {
|
|
14
|
-
port: env.get('PORT', 3000), // -> number (baseado no default)
|
|
15
|
-
debug: env.get('DEBUG', false), // -> boolean (baseado no default)
|
|
16
|
-
origins: env.get('CORS_ORIGINS', ['*']), // -> string[] (baseado no default)
|
|
17
|
-
host: env.get('HOST', 'localhost'), // -> string (baseado no default)
|
|
18
|
-
dbUrl: env.get('DATABASE_URL'), // -> string | undefined
|
|
19
|
-
retries: env.get('MAX_RETRIES', 3), // -> number
|
|
20
|
-
features: env.get('FEATURES', ['api']) // -> string[]
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// β ANTES - API verbosa com mΓ©todos especΓficos
|
|
24
|
-
const oldConfig = {
|
|
25
|
-
port: env.num('PORT', 3000),
|
|
26
|
-
debug: env.bool('DEBUG', false),
|
|
27
|
-
origins: env.array('CORS_ORIGINS', ['*']),
|
|
28
|
-
host: env.get('HOST', 'localhost'),
|
|
29
|
-
dbUrl: env.get('DATABASE_URL'),
|
|
30
|
-
retries: env.num('MAX_RETRIES', 3),
|
|
31
|
-
features: env.array('FEATURES', ['api'])
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// ========================================
|
|
35
|
-
// 2. ACESSO DIRETO COMO PROPRIEDADES
|
|
36
|
-
// ========================================
|
|
37
|
-
|
|
38
|
-
console.log(`π Starting on ${env.HOST}:${env.PORT}`) // Direto!
|
|
39
|
-
console.log(`π Environment: ${env.NODE_ENV}`) // Direto!
|
|
40
|
-
console.log(`π Debug mode: ${env.DEBUG}`) // Direto!
|
|
41
|
-
console.log(`π Swagger: ${env.ENABLE_SWAGGER}`) // Direto!
|
|
42
|
-
console.log(`πΎ Database: ${env.DATABASE_URL || 'not configured'}`) // Direto!
|
|
43
|
-
|
|
44
|
-
// Todos com tipos corretos automaticamente!
|
|
45
|
-
|
|
46
|
-
// ========================================
|
|
47
|
-
// 3. CONFIGURAΓΓO DE SERVIDOR SIMPLIFICADA
|
|
48
|
-
// ========================================
|
|
49
|
-
|
|
50
|
-
export function createSimpleServer() {
|
|
51
|
-
return {
|
|
52
|
-
// Casting automΓ‘tico baseado no tipo do default
|
|
53
|
-
server: {
|
|
54
|
-
port: env.get('PORT', 3000), // number
|
|
55
|
-
host: env.get('HOST', 'localhost'), // string
|
|
56
|
-
timeout: env.get('TIMEOUT', 30000), // number
|
|
57
|
-
keepAlive: env.get('KEEP_ALIVE', true) // boolean
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
// Ou acesso direto
|
|
61
|
-
database: {
|
|
62
|
-
url: env.DATABASE_URL, // string
|
|
63
|
-
ssl: env.DB_SSL, // boolean
|
|
64
|
-
port: env.DB_PORT, // number
|
|
65
|
-
maxConnections: env.get('DB_MAX_CONNECTIONS', 10) // number
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
cors: {
|
|
69
|
-
origins: env.CORS_ORIGINS, // string[]
|
|
70
|
-
credentials: env.get('CORS_CREDENTIALS', false), // boolean
|
|
71
|
-
maxAge: env.get('CORS_MAX_AGE', 86400) // number
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// ========================================
|
|
77
|
-
// 4. NAMESPACES PARA ORGANIZAΓΓO
|
|
78
|
-
// ========================================
|
|
79
|
-
|
|
80
|
-
// Criar namespaces especializados
|
|
81
|
-
const db = createNamespace('DATABASE_')
|
|
82
|
-
const redis = createNamespace('REDIS_')
|
|
83
|
-
const smtp = createNamespace('SMTP_')
|
|
84
|
-
|
|
85
|
-
const databaseConfig = {
|
|
86
|
-
url: db.get('URL'), // DATABASE_URL
|
|
87
|
-
host: db.get('HOST', 'localhost'), // DATABASE_HOST
|
|
88
|
-
port: db.get('PORT', 5432), // DATABASE_PORT (number)
|
|
89
|
-
ssl: db.get('SSL', false), // DATABASE_SSL (boolean)
|
|
90
|
-
poolSize: db.get('POOL_SIZE', 10), // DATABASE_POOL_SIZE (number)
|
|
91
|
-
timeout: db.get('TIMEOUT', 30000) // DATABASE_TIMEOUT (number)
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
const redisConfig = {
|
|
95
|
-
url: redis.get('URL'), // REDIS_URL
|
|
96
|
-
host: redis.get('HOST', 'localhost'), // REDIS_HOST
|
|
97
|
-
port: redis.get('PORT', 6379), // REDIS_PORT (number)
|
|
98
|
-
password: redis.get('PASSWORD') // REDIS_PASSWORD
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// ========================================
|
|
102
|
-
// 5. CONFIGURAΓΓO CONDICIONAL ELEGANTE
|
|
103
|
-
// ========================================
|
|
104
|
-
|
|
105
|
-
export function createConditionalConfig() {
|
|
106
|
-
const config: any = {
|
|
107
|
-
app: {
|
|
108
|
-
name: env.FLUXSTACK_APP_NAME, // 'FluxStack'
|
|
109
|
-
version: env.FLUXSTACK_APP_VERSION // '1.0.0'
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
server: {
|
|
113
|
-
port: env.PORT, // 3000
|
|
114
|
-
host: env.HOST // 'localhost'
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// Adicionar database se configurado
|
|
119
|
-
if (env.has('DATABASE_URL')) {
|
|
120
|
-
config.database = {
|
|
121
|
-
url: env.DATABASE_URL,
|
|
122
|
-
ssl: env.get('DB_SSL', env.NODE_ENV === 'production') // smart default
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// Features opcionais
|
|
127
|
-
if (env.ENABLE_MONITORING) {
|
|
128
|
-
config.monitoring = {
|
|
129
|
-
metrics: env.ENABLE_METRICS,
|
|
130
|
-
interval: env.get('METRICS_INTERVAL', 30000)
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
return config
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// ========================================
|
|
138
|
-
// 6. VALIDAΓΓO SIMPLIFICADA
|
|
139
|
-
// ========================================
|
|
140
|
-
|
|
141
|
-
export function validateEnvironment() {
|
|
142
|
-
// Vars obrigatΓ³rias
|
|
143
|
-
validate.require(['NODE_ENV'])
|
|
144
|
-
|
|
145
|
-
// ProduΓ§Γ£o precisa de mais vars
|
|
146
|
-
if (helpers.isProduction()) {
|
|
147
|
-
validate.require(['DATABASE_URL', 'JWT_SECRET'])
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// Validar valores especΓficos
|
|
151
|
-
validate.oneOf('NODE_ENV', ['development', 'production', 'test'])
|
|
152
|
-
validate.oneOf('LOG_LEVEL', ['debug', 'info', 'warn', 'error'])
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// ========================================
|
|
156
|
-
// 7. HELPERS ΓTEIS
|
|
157
|
-
// ========================================
|
|
158
|
-
|
|
159
|
-
export function printConfiguration() {
|
|
160
|
-
console.log('π§ Configuration loaded:')
|
|
161
|
-
console.log(` Environment: ${env.NODE_ENV}`)
|
|
162
|
-
console.log(` Server: ${helpers.getServerUrl()}`)
|
|
163
|
-
console.log(` Client: ${helpers.getClientUrl()}`)
|
|
164
|
-
console.log(` Database: ${helpers.getDatabaseUrl() || 'not configured'}`)
|
|
165
|
-
console.log(` Debug: ${env.DEBUG ? 'enabled' : 'disabled'}`)
|
|
166
|
-
console.log(` Swagger: ${env.ENABLE_SWAGGER ? 'enabled' : 'disabled'}`)
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// ========================================
|
|
170
|
-
// 8. FLUXSTACK INTEGRATION SIMPLIFICADA
|
|
171
|
-
// ========================================
|
|
172
|
-
|
|
173
|
-
import { FluxStackFramework } from '../core/framework/server'
|
|
174
|
-
|
|
175
|
-
export function createSimpleFluxStack() {
|
|
176
|
-
validateEnvironment()
|
|
177
|
-
|
|
178
|
-
const app = new FluxStackFramework({
|
|
179
|
-
app: {
|
|
180
|
-
name: env.FLUXSTACK_APP_NAME, // Direto!
|
|
181
|
-
version: env.FLUXSTACK_APP_VERSION // Direto!
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
server: {
|
|
185
|
-
port: env.PORT, // Direto! (number)
|
|
186
|
-
host: env.HOST, // Direto! (string)
|
|
187
|
-
apiPrefix: env.API_PREFIX, // Direto! (string)
|
|
188
|
-
cors: {
|
|
189
|
-
origins: env.CORS_ORIGINS, // Direto! (string[])
|
|
190
|
-
credentials: env.get('CORS_CREDENTIALS', false) // boolean
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
|
|
194
|
-
client: {
|
|
195
|
-
port: env.VITE_PORT, // Direto! (number)
|
|
196
|
-
proxy: {
|
|
197
|
-
target: helpers.getServerUrl() // Helper!
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
})
|
|
201
|
-
|
|
202
|
-
// Plugins condicionais
|
|
203
|
-
if (env.ENABLE_SWAGGER) {
|
|
204
|
-
console.log('π Swagger enabled')
|
|
205
|
-
// app.use(swaggerPlugin)
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
if (env.ENABLE_MONITORING) {
|
|
209
|
-
console.log('π Monitoring enabled')
|
|
210
|
-
// app.use(monitoringPlugin)
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
return app
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
// ========================================
|
|
217
|
-
// 9. COMPARAΓΓO ANTES vs DEPOIS
|
|
218
|
-
// ========================================
|
|
219
|
-
|
|
220
|
-
// β ANTES - Verboso
|
|
221
|
-
const beforeConfig = {
|
|
222
|
-
port: env.num('PORT', 3000),
|
|
223
|
-
debug: env.bool('DEBUG', false),
|
|
224
|
-
origins: env.array('CORS_ORIGINS', ['*']),
|
|
225
|
-
retries: env.num('MAX_RETRIES', 3),
|
|
226
|
-
timeout: env.num('TIMEOUT', 30000)
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// β
DEPOIS - Limpo e elegante
|
|
230
|
-
const afterConfig = {
|
|
231
|
-
port: env.get('PORT', 3000), // casting automΓ‘tico
|
|
232
|
-
debug: env.get('DEBUG', false), // casting automΓ‘tico
|
|
233
|
-
origins: env.get('CORS_ORIGINS', ['*']), // casting automΓ‘tico
|
|
234
|
-
retries: env.get('MAX_RETRIES', 3), // casting automΓ‘tico
|
|
235
|
-
timeout: env.get('TIMEOUT', 30000) // casting automΓ‘tico
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// Ou ainda mais simples com propriedades diretas:
|
|
239
|
-
const simpleConfig = {
|
|
240
|
-
port: env.PORT, // Direto da propriedade
|
|
241
|
-
debug: env.DEBUG, // Direto da propriedade
|
|
242
|
-
origins: env.CORS_ORIGINS // Direto da propriedade
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
export default {
|
|
246
|
-
createSimpleServer,
|
|
247
|
-
createConditionalConfig,
|
|
248
|
-
validateEnvironment,
|
|
249
|
-
printConfiguration,
|
|
250
|
-
createSimpleFluxStack
|
|
251
|
-
}
|
package/meu-app-teste/README.md
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# meu-app-teste
|
|
2
|
-
|
|
3
|
-
β‘ **FluxStack Application** - Modern full-stack TypeScript framework
|
|
4
|
-
|
|
5
|
-
## π Getting Started
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# Start development
|
|
9
|
-
bun run dev
|
|
10
|
-
|
|
11
|
-
# Build for production
|
|
12
|
-
bun run build
|
|
13
|
-
|
|
14
|
-
# Start production server
|
|
15
|
-
bun run start
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## π Project Structure
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
meu-app-teste/
|
|
22
|
-
βββ core/ # FluxStack framework (don't modify)
|
|
23
|
-
βββ app/ # Your application code
|
|
24
|
-
β βββ server/ # Backend API routes
|
|
25
|
-
β βββ client/ # Frontend React app
|
|
26
|
-
β βββ shared/ # Shared types and utilities
|
|
27
|
-
βββ package.json
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## π₯ Features
|
|
31
|
-
|
|
32
|
-
- **β‘ Bun Runtime** - 3x faster than Node.js
|
|
33
|
-
- **π Full Type Safety** - Eden Treaty + TypeScript
|
|
34
|
-
- **π¨ Modern UI** - React 19 + Tailwind CSS v4
|
|
35
|
-
- **π Auto Documentation** - Swagger UI generated
|
|
36
|
-
- **π Hot Reload** - Backend + Frontend
|
|
37
|
-
|
|
38
|
-
## π Learn More
|
|
39
|
-
|
|
40
|
-
Visit the [FluxStack Documentation](https://fluxstack.dev) to learn more!
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
Built with β€οΈ using FluxStack
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# React + TypeScript + Vite
|
|
2
|
-
|
|
3
|
-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
-
|
|
5
|
-
Currently, two official plugins are available:
|
|
6
|
-
|
|
7
|
-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
-
|
|
10
|
-
## Expanding the ESLint configuration
|
|
11
|
-
|
|
12
|
-
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
13
|
-
|
|
14
|
-
```js
|
|
15
|
-
export default tseslint.config([
|
|
16
|
-
globalIgnores(['dist']),
|
|
17
|
-
{
|
|
18
|
-
files: ['**/*.{ts,tsx}'],
|
|
19
|
-
extends: [
|
|
20
|
-
// Other configs...
|
|
21
|
-
|
|
22
|
-
// Remove tseslint.configs.recommended and replace with this
|
|
23
|
-
...tseslint.configs.recommendedTypeChecked,
|
|
24
|
-
// Alternatively, use this for stricter rules
|
|
25
|
-
...tseslint.configs.strictTypeChecked,
|
|
26
|
-
// Optionally, add this for stylistic rules
|
|
27
|
-
...tseslint.configs.stylisticTypeChecked,
|
|
28
|
-
|
|
29
|
-
// Other configs...
|
|
30
|
-
],
|
|
31
|
-
languageOptions: {
|
|
32
|
-
parserOptions: {
|
|
33
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
34
|
-
tsconfigRootDir: import.meta.dirname,
|
|
35
|
-
},
|
|
36
|
-
// other options...
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
])
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
43
|
-
|
|
44
|
-
```js
|
|
45
|
-
// eslint.config.js
|
|
46
|
-
import reactX from 'eslint-plugin-react-x'
|
|
47
|
-
import reactDom from 'eslint-plugin-react-dom'
|
|
48
|
-
|
|
49
|
-
export default tseslint.config([
|
|
50
|
-
globalIgnores(['dist']),
|
|
51
|
-
{
|
|
52
|
-
files: ['**/*.{ts,tsx}'],
|
|
53
|
-
extends: [
|
|
54
|
-
// Other configs...
|
|
55
|
-
// Enable lint rules for React
|
|
56
|
-
reactX.configs['recommended-typescript'],
|
|
57
|
-
// Enable lint rules for React DOM
|
|
58
|
-
reactDom.configs.recommended,
|
|
59
|
-
],
|
|
60
|
-
languageOptions: {
|
|
61
|
-
parserOptions: {
|
|
62
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
63
|
-
tsconfigRootDir: import.meta.dirname,
|
|
64
|
-
},
|
|
65
|
-
// other options...
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
])
|
|
69
|
-
```
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// Frontend standalone entry point
|
|
2
|
-
import { startFrontendOnly } from "../../core/client/standalone"
|
|
3
|
-
|
|
4
|
-
// ConfiguraΓ§Γ£o para frontend standalone
|
|
5
|
-
const frontendConfig = {
|
|
6
|
-
clientPath: "app/client",
|
|
7
|
-
vitePort: (globalThis as any).process?.env?.FRONTEND_PORT || 5173,
|
|
8
|
-
apiUrl: (globalThis as any).process?.env?.API_URL || "http://localhost:3001"
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// Iniciar apenas o frontend
|
|
12
|
-
startFrontendOnly(frontendConfig)
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>Vite + React + TS</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div id="root"></div>
|
|
11
|
-
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
-
</body>
|
|
13
|
-
</html>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|